monit-general
[Top][All Lists]
Advanced

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

Re: Monitoring logs


From: Martin Pala
Subject: Re: Monitoring logs
Date: Wed, 2 Mar 2016 15:05:08 +0100

Hello Petra,

monit saves the log file position in the state file (by default stored in 
~/.monit.state). If the inode changes, or size of the file shrinks, the 
position is reset.

Please check if your state file is stored in a persistent filesystem. 

Regards,
Martin


> On 02 Mar 2016, at 10:03, Petra Humann <address@hidden> wrote:
> 
> Hello,
> 
> I’m monitoring syslog with
> 
> check file syslog with path /var/log/syslog
>       stop program = "/usr/bin/ssh remote /sbin/cmd parameter"
>       start program = "/bin/true"
>       if match „some string" then restart
> 
> Two problems:
> If I start monitoring, the whole syslog is scanned from beginning 
> and not from the monit start time.
> If the condition occurs, I see in the logs of the remote system
> the login, but the command "/sbin/cmd parameter“ is not always
> executed. I also tried exec like
> 
> if match „some string" then exec "/bin/bash -c '
>                /usr/bin/ssh remote /sbin/cmd parameter
>                '“
> 
> Here I see the login, but the command was never executed.
> The system is an actual Debian Jessie LTS.
> 
> Any hints? Thank you.
> Petra Humann
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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