The complication I need to handle is that when this file is logrotated it
should not alert me
Nick Upson



On 18 January 2012 09:51, Nick Upson <[email protected]> wrote:

> Hi,
>
> Access: 2012-01-16 23:55:16.000000000 +0000
> Modify: 2012-01-16 23:55:16.000000000 +0000
> Change: 2012-01-18 09:45:01.000000000 +0000
>
> That's it then, the ctime is changing, which is wierd because there is no
> change to the file itself. I need another way to be alerted when the file
> changes, MD5sum perhaps
>
> Nick Upson
>
>
>
>
> On 17 January 2012 21:49, Martin Pala <[email protected]> wrote:
>
>> Hi,
>>
>> can you get the "stat" output for that file? Monit tests the mtime
>> (content modification time) and ctime (inode modification time - owner,
>> permission, etc.), the event is generated if one of them changed. The "ls"
>> won't display ctime by default, to display the ctime with ls, you can use:
>> "ls -lc"
>>
>> Regards,
>> Martin
>>
>>
>>
>> On Jan 17, 2012, at 5:39 PM, Nick Upson wrote:
>>
>> > Hi,
>> >
>> > I continue to get alerts from the config entry below even when the file
>> hasn't changed, it doesn't happen every cycle either.
>> > The log extract below it changing yet the file hasn't changed since
>> 16:14
>> >
>> > check file firebirdlog with path /var/log/firebird/firebird.log
>> > if changed timestamp then alert
>> >
>> > [GMT Jan 17 16:20:33] debug    : 'firebirdlog' file exists check
>> succeeded
>> > [GMT Jan 17 16:20:33] debug    : 'firebirdlog' is a regular file
>> > [GMT Jan 17 16:20:33] error    : 'firebirdlog' timestamp was changed
>> for /var/log/firebird/firebird.log
>> > [GMT Jan 17 16:23:05] debug    : 'firebirdlog' file exists check
>> succeeded
>> > [GMT Jan 17 16:23:05] debug    : 'firebirdlog' is a regular file
>> > [GMT Jan 17 16:23:05] debug    : 'firebirdlog' timestamp was not
>> changed for /var/log/firebird/firebird.log
>> > [GMT Jan 17 16:23:05] info     : 'firebirdlog' timestamp was not
>> changed for /var/log/firebird/firebird.log
>> > [GMT Jan 17 16:25:37] debug    : 'firebirdlog' file exists check
>> succeeded
>> > [GMT Jan 17 16:25:37] debug    : 'firebirdlog' is a regular file
>> > [GMT Jan 17 16:25:37] error    : 'firebirdlog' timestamp was changed
>> for /var/log/firebird/firebird.log
>> > [GMT Jan 17 16:28:09] debug    : 'firebirdlog' file exists check
>> succeeded
>> > [GMT Jan 17 16:28:09] debug    : 'firebirdlog' is a regular file
>> > [GMT Jan 17 16:28:09] debug    : 'firebirdlog' timestamp was not
>> changed for /var/log/firebird/firebird.log
>> > [GMT Jan 17 16:28:09] info     : 'firebirdlog' timestamp was not
>> changed for /var/log/firebird/firebird.log
>> > [GMT Jan 17 16:30:41] debug    : 'firebirdlog' file exists check
>> succeeded
>> > [GMT Jan 17 16:30:41] debug    : 'firebirdlog' is a regular file
>> > [GMT Jan 17 16:30:41] error    : 'firebirdlog' timestamp was changed
>> for /var/log/firebird/firebird.log
>> > [GMT Jan 17 16:33:13] debug    : 'firebirdlog' file exists check
>> succeeded
>> > [GMT Jan 17 16:33:13] debug    : 'firebirdlog' is a regular file
>> > [GMT Jan 17 16:33:13] debug    : 'firebirdlog' timestamp was not
>> changed for /var/log/firebird/firebird.log
>> > [GMT Jan 17 16:33:13] info     : 'firebirdlog' timestamp was not
>> changed for /var/log/firebird/firebird.log
>> > [GMT Jan 17 16:35:45] debug    : 'firebirdlog' file exists check
>> succeeded
>> > [GMT Jan 17 16:35:45] debug    : 'firebirdlog' is a regular file
>> > [GMT Jan 17 16:35:45] error    : 'firebirdlog' timestamp was changed
>> for /var/log/firebird/firebird.log
>> >
>> > Nick Upson
>> >
>> > --
>> > To unsubscribe:
>> > https://lists.nongnu.org/mailman/listinfo/monit-general
>>
>>
>> --
>> To unsubscribe:
>> https://lists.nongnu.org/mailman/listinfo/monit-general
>>
>
>
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to