|
From: | Anthony Griffiths |
Subject: | Re: monit ignores match pattern commnad |
Date: | Mon, 7 Apr 2014 16:33:38 +0100 |
Please can you send few sample lines from the logfile to which the pattern should match?The following line is most probably not necessary, as monit doesn't log to the same file most probably:ignore match "^monit"On 07 Apr 2014, at 16:55, Anthony Griffiths <address@hidden> wrote:--any help on this mailing list? I'm kinda stuck here....---------- Forwarded message ----------
From: Anthony Griffiths <address@hidden>
Date: Sun, Apr 6, 2014 at 9:51 AM
Subject: monit ignores match pattern commnad
To: This is the general mailing list for monit <address@hidden>
using the example IF [NOT] MATCH {regex|path} THEN action I'm trying to get monit to watch a logfile for a pattern and then trigger a script. The logfile is /home/share/openvpn/log and the relevant test string in the file is 'Initialization Sequence Completed'.In monitor.conf I have:check file openvpn-client.log with path /home/share/openvpn-client.logignore match "^monit"if match "^Initialization Sequence Completed | /home/share/openvpn-client.log"then exec "/root/sendemail.sh"however in the monit log all I get (every minute) is:[BST Apr 6 00:05:52] debug : 'openvpn-client.log' file exists check succeeded[BST Apr 6 00:05:52] debug : 'openvpn-client.log' is a regular file[BST Apr 6 00:06:52] debug : 'openvpn-client.log' file exists check succeeded[BST Apr 6 00:06:52] debug : 'openvpn-client.log' is a regular file[BST Apr 6 00:07:52] debug : 'openvpn-client.log' file exists check succeeded[BST Apr 6 00:07:52] debug : 'openvpn-client.log' is a regular file[BST Apr 6 00:08:52] debug : 'openvpn-client.log' file exists check succeeded[BST Apr 6 00:08:52] debug : 'openvpn-client.log' is a regular file[BST Apr 6 00:09:52] debug : 'openvpn-client.log' file exists check succeeded[BST Apr 6 00:09:52] debug : 'openvpn-client.log' is a regular file[BST Apr 6 00:10:52] debug : 'openvpn-client.log' file exists check succeeded[BST Apr 6 00:10:52] debug : 'openvpn-client.log' is a regular filemonit is not looking for the pattern. What am I doing wrong?
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
[Prev in Thread] | Current Thread | [Next in Thread] |