View previous topic :: View next topic |
Author |
Message |
mandg
Joined: 20 Feb 2008 Posts: 12
|
Posted: Sun Oct 19, 2008 3:20 pm Post subject: Advanced Action syntax |
|
|
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. |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Sun Oct 19, 2008 5:06 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
mandg
Joined: 20 Feb 2008 Posts: 12
|
Posted: Sun Oct 19, 2008 7:08 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Sun Oct 19, 2008 7:20 pm Post subject: |
|
|
Sorry, my mistake
Regards
Alex |
|
Back to top |
|
|
xcentric
Joined: 23 Oct 2010 Posts: 176
|
Posted: Sat Mar 19, 2011 8:43 pm Post subject: |
|
|
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.
Quote: | ('%::Some Random Test Name::Status%'=='Bad' And %Recurrences%>=5)
|
Quote: | ('%::Some Random Test Name::Status%'=='Bad') And ('%::Some Random Test Name::Recurrences%>=5)
|
|
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Mon Mar 21, 2011 10:46 am Post subject: |
|
|
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 |
|
Back to top |
|
|
xcentric
Joined: 23 Oct 2010 Posts: 176
|
Posted: Mon Mar 21, 2011 11:29 am Post subject: |
|
|
Got it. Thank you.
So what are the quotations for? Neccessary? Specifying text strings? |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Mon Mar 21, 2011 11:31 am Post subject: |
|
|
It is nesessary for strings like 'bad', 'host is alive', variables that returns strings, e.g. '%status%', '%reply%
Optional for numbers.
Regards
Alex |
|
Back to top |
|
|
|