|
From: | Jorge Bastos |
Subject: | trigger for asterisk log file |
Date: | Mon, 21 Apr 2014 16:49:31 +0100 |
Ok no luck, My script is under conf.d, and conf.d is included in monitrc, I changed the script to contain an error and I was alerted about it so it’s being executed: check file asterisk with path /var/log/asterisk/full if match "channel" then exec /sbin/asterisk-alert-channels /sbin/asterisk-alert-channels has: -- #!/bin/sh echo "o canal XXX caiu" |mail -s "asterisk channel down" address@hidden -- Of course it’s chmod +x. I manually tailed the asterisk log and removed and inserted some lines to have the “channel” word in the logs, but nothing happened. Any ideas? From: address@hidden [mailto:address@hidden] On Behalf Of Jorge Bastos Let me play J From: address@hidden [mailto:address@hidden] On Behalf Of Anthony Griffiths yes it is. I'm only a beginner with monit but I got it to do that. In the control file you could try this: check file asterisk with path /path/to/asterisk/log if match "<your word>" then exec "echo "<your message> | mailx -s "monit detection" address@hidden" On Sun, Apr 20, 2014 at 9:12 PM, Jorge Bastos <address@hidden> wrote: Hi, Is monit able to send an email when certain word appears in asterisk’s log ? Jorge,
|
[Prev in Thread] | Current Thread | [Next in Thread] |