I need to configure monit to monitor /var/log/syslog.log for the string "NETDEV WATCHDOG: eth0 (e1000e): transmit queue 0 timed out" and reboot ONE time if it should find this string. This string could have characters before and after it.
check file syslog.log with path /var/log/syslog.log
if match "NETDEV WATCHDOG: eth0 (e1000e): transmit queue 0 timed out" then exec "/sbin/init 6"
However, monit shows the below contents when configured this way. I have echo'ed the string into syslog.log, and still nothing. What am I missing?
Parameter |
Value |
Name |
syslog.log |
Path |
/var/log/syslog.log |
Status |
Does not exist |
Monitoring mode |
active |
Monitoring status |
monitored |
Check service |
every 1 cycle |
Data collected |
Thu Mar 29 13:20:54 2012 |
Permission |
- |
UID |
- |
GID |
- |
Timestamp |
- |
Size |
- |
Match regex |
- |
Associated regex |
If match "NETDEV WATCHDOG: eth0 (e1000e): transmit queue 0 timed out" 1 times within 1 cycle(s) then exec '/sbin/init 6' timeout 0 cycle(s) |
--
thanks,
Trent
--