Advanced Action syntax

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
mandg
Posts: 12
Joined: Wed Feb 20, 2008 2:44 pm

Advanced Action syntax

Post by mandg »

I'm looking to setup an advanced mode action (send email) when a system has been down for 15 minutes. I am currently pinging all systems every 30 seconds, so, should I count the number of consecutive recurrences or is there someway to explicitly define "15 minutes"?

I'm using Hostmon version 6.82. Thanks in advance.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You may use %Recurrences% or %CurrentStatusDuration_sec% variables.
E.g.
('%SimpleStatus%'=='DOWN') and (%Recurrences%=30)
or
('%SimpleStatus%'=='DOWN') and (%CurrentStatusDuration_sec% >= 900) and (%CurrentStatusDuration_sec% < 915)

Regards
Alex
mandg
Posts: 12
Joined: Wed Feb 20, 2008 2:44 pm

Post by mandg »

That's perfect, thanks! I only had to add an extra equal sign (=) at the end of the first example. So, the amended expression that I used was:

('%SimpleStatus%'=='DOWN') and (%Recurrences%==30)

Thanks again.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Sorry, my mistake :oops:

Regards
Alex
xcentric
Posts: 176
Joined: Sat Oct 23, 2010 4:30 pm

Post by xcentric »

I need to do something similar in dependency advance mode but having trouble.

In dependency advance mode I use this to get status of another test.
('%::Some Random Test Name::Status%'=='Bad')

But now I want to add the other tests recurrences with the status.

Things I have tried that have not worked are.
('%::Some Random Test Name::Status%'=='Bad' And %Recurrences%>=5)
('%::Some Random Test Name::Status%'=='Bad') And ('%::Some Random Test Name::Recurrences%>=5)
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

1st expression invalid.
In 2nd expression you forgot 1 quotation mark (actually you may remove 1 quotation mark or add another)
('%::Some Random Test Name::Status%'=='Bad') And (%::Some Random Test Name::Recurrences%>=5)
or
('%::Some Random Test Name::Status%'=='Bad') And ('%::Some Random Test Name::Recurrences%'>=5)

Regards
Alex
xcentric
Posts: 176
Joined: Sat Oct 23, 2010 4:30 pm

Post by xcentric »

Got it. Thank you.

So what are the quotations for? Neccessary? Specifying text strings?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

It is nesessary for strings like 'bad', 'host is alive', variables that returns strings, e.g. '%status%', '%reply%
Optional for numbers.

Regards
Alex
Post Reply