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 <[email protected]> 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 -- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general
