Hum monit seems to be running as root, but already chmod’ed var + log + asterisk , and tried again and nothing,
Maybe there’s something wrong in my conf, From: [email protected] [mailto:[email protected]] On Behalf Of Phil Townes Sent: segunda-feira, 21 de Abril de 2014 17:13 To: This is the general mailing list for monit Subject: Re: trigger for asterisk log file Does the account monit is running under have permissions to read the asterisk log file? On 21 Apr 2014 16:50, "Jorge Bastos" <[email protected]> wrote: 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" [email protected] -- 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: [email protected] [mailto:[email protected]] On Behalf Of Jorge Bastos Sent: segunda-feira, 21 de Abril de 2014 10:24 To: 'This is the general mailing list for monit' Subject: RE: trigger for asterisk log file Let me play J From: [email protected] [mailto:[email protected]] On Behalf Of Anthony Griffiths Sent: domingo, 20 de Abril de 2014 21:36 To: This is the general mailing list for monit Subject: Re: trigger for asterisk log file 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" [email protected]" On Sun, Apr 20, 2014 at 9:12 PM, Jorge Bastos <[email protected] <mailto:[email protected]> > wrote: Hi, Is monit able to send an email when certain word appears in asterisk’s log ? Jorge, -- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general -- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general
-- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general
