KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

Advanced Action syntax

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
mandg



Joined: 20 Feb 2008
Posts: 12

PostPosted: Sun Oct 19, 2008 3:20 pm    Post subject: Advanced Action syntax Reply with quote

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
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Sun Oct 19, 2008 5:06 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
mandg



Joined: 20 Feb 2008
Posts: 12

PostPosted: Sun Oct 19, 2008 7:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Sun Oct 19, 2008 7:20 pm    Post subject: Reply with quote

Sorry, my mistake

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
xcentric



Joined: 23 Oct 2010
Posts: 176

PostPosted: Sat Mar 19, 2011 8:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Mon Mar 21, 2011 10:46 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
xcentric



Joined: 23 Oct 2010
Posts: 176

PostPosted: Mon Mar 21, 2011 11:29 am    Post subject: Reply with quote

Got it. Thank you.

So what are the quotations for? Neccessary? Specifying text strings?
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Mon Mar 21, 2011 11:31 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index