Dear all,
I start to build script(s) for few tasks, and I'll use log files to complete the following:
So I have plan to use cron tasks, and bash scripts with queue_log grep for EXITEMPTY, EXITWITHTIMEOUT, RINGNOANSWER, operator name and queue number.
Well, that is just plan for now. Please if you have any ideas, could you please share.. ? May be there is easier way to do this.. I have zabbix already, and data needed is there in sql database. May be there is a way to pull the needed data from there?
thanks in advance
OS: CentOS
Asterisk 11.18.0
---------- Post updated at 12:56 PM ---------- Previous update was at 04:35 AM ----------
My first step is created user "select" for mysql and the following:
The output is:
So I believe my next step should be to make unix time into readable, may be using: awk '{ print strftime("%c", $0); }'
I have no idea how to grep only with waittime > 14000 (this is last value after RINGNOANSWER), and how to add them into new text file (may be using cron and update text file with new results instead to rewrite the file every time). After that to check if there is NAME > 10, and if true to send mail with output. This may be will lead to new problem - duplicate emails, so may be when NAME > 10 is true, on email to clear the text file.
Please .. someone.. give idea
Last edited by jim mcnamara; 03-17-2016 at 11:06 PM..
Please share a shell script to collect logs of a server (like cpu utilization, memory etc) for a perticular time interval by giving date, time and server name as input. (1 Reply)
Hello,
I am trying to save in a file a single "*" but its not working... look what i am doing...
FILE="/home/teste/a.txt"
...BEGIN...
ASTERISK="*"
echo "STRING $ASTERISK STRING" >> $FILE
...END...
when i do it, the result is a list of all files of the current... (4 Replies)
Hello everyone.
I wrote the following script but the second part is not excecuting. It is not sending the notification by email if the error occurs.
the send mail is working so i think the errorr should be in the if statement
LOGDIR=/logs/out
LOG=`date "+%Y%m%d"`.LOG-FILE.out #the log file ... (11 Replies)
I am currently trying to develop a script to connect to mulltiple servers, reading specifc data from log files on the servers and append the data from each file into a single tab delimited row. So, at the end I am planning to have a report with all the extracted data with each row per server. I am... (5 Replies)
Hi,
I have a strange situation here, I want to archive gc.logs file, generated by a java application, the strange thing about gc.log file is is doesn't have any time/date stamp appended to it unlike other logs (catalina/access/error) and one more strange thing is when ever the application is... (6 Replies)
Hi Experts,
I am new to shell.How to extract logs (Web,APP,Database) using shell in performance testing?
Need for webserver logs,app server logs and d/b logs code.
Thanks in advance
Sree (3 Replies)
Hi,
I need write a shell script which should be executed from the crontab every day.
This shell script is running several other shell scripts , and each one of them is writing to its log file.
Few of the the shell script are also connecting using ssh to some other users on remote machine , do... (1 Reply)
Hi
I'm very new to unix shell scripting. Im also new here in this forum. I'm a SQL Server DBA but I'm slowly learning Oracle and Sybase DB. Our Oracle and Sybase are on Unix platforms. Im slowly learning Linux Admin and Shell Scripting to automate tasks.
I'm writing a script to view DB error... (4 Replies)
I have a script
#!/bin/bash
HOST=ftp.example.com
USER=ftpuser
PASSWORD=P@ssw0rd
ftp -inv $HOST <<EOF
user $USER $PASSWORD
cd /path/to/file
mput *.html
bye
EOF
the script executes sucessfully I need to capture the FTP logs to a logfile
should contain
FTP Login successful
... (1 Reply)
Appreciate help for the below issue.
Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt..............
1)if logs exist it should move the logs with extention... (1 Reply)