monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to monitor syslog.log for a certain string and then reboot if it


From: Eric PAILLEAU
Subject: Re: how to monitor syslog.log for a certain string and then reboot if it finds it
Date: Fri, 30 Mar 2012 09:09:06 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

Hello,
be carefull that 'match' is regular expression, some characters like ': ()' are special ones.

I guess you can match only "NETDEV WATCHDOG.*" or "NETDEV WATCHDOG. eth0.*"
(A dot replace any character or may be you can escape  by  \: )


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"


--




reply via email to

[Prev in Thread] Current Thread [Next in Thread]