Yeah whether it’s an alias or a macro, that would solve the problem. I guess 
I’ll have to look into this a little more.

Thanks,
Dominic

From: monit-general 
[mailto:[email protected]] On Behalf Of 
Martin Pala
Sent: Friday, May 20, 2016 7:19 AM
To: This is the general mailing list for monit <[email protected]>
Subject: Re: Timestamp Not Changed

The implementation of "if not changed timestamp then ACTION" as an alias for 
"if timestamp > <cycle length> then <action>" would be simple, but i think the 
"if not changed" will be confusing - if you see it in the configuration file, 
it's not obvious which timeframe is the test related to.

We can probably add some macros ... currently there is just $HOST macro, 
something like $CYCLE_LENGTH may solve the problem - you can then use:

            if timestamp > $CYCLE_LENGTH then <action>


Best regards,
Martin


On 19 May 2016, at 21:12, Dominic Harkness 
<[email protected]<mailto:[email protected]>> wrote:

Thanks for the response!

I’ve tried this. I just don’t like hard coding more time values in the config. 
Saying “not changed” makes the monit daemon interval the only configurable time 
value.

From: monit-general 
[mailto:[email protected]] On Behalf Of 
Chris McGinley
Sent: Thursday, May 19, 2016 3:07 PM
To: This is the general mailing list for monit 
<[email protected]<mailto:[email protected]>>
Subject: Re: Timestamp Not Changed

Perhaps you could check the age of the timestamp; for example:

    if timestamp > 2 hour then alert
Chris McGinley, CISSP, CCE
[email protected]<mailto:[email protected]>

BTB Security
www.btbsecurity.com<http://www.btbsecurity.com/>
On 05/19/2016 12:05 PM, Dominic Harkness wrote:
Hi all,

I have an application that should touch a file periodically. If it doesn’t I’d 
like monit to execute some script. The monit documentation show a check for “if 
timestamp changed.” Is there some way I can check “if timestamp NOT changed?”

Thanks,
Dominic





--

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