New Variable

Need new test, action, option? Post request here.
Post Reply
DewaltGuy
Posts: 4
Joined: Fri Feb 09, 2007 4:05 pm

New Variable

Post by DewaltGuy »

Is is possible to add a new variable called %LastRecurrences%

I would like to use this when a condtion is bad then changes to good. I would like to know the number of bad recurrences it had so I can email specify people based on that number.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

H'm.. are you really need this variable? I think you may use "Action depends on bad one" option instead :roll:
http://www.ks-soft.net/hostmon.eng/mfra ... dardaction

Regards
Alex
DewaltGuy
Posts: 4
Joined: Fri Feb 09, 2007 4:05 pm

Post by DewaltGuy »

What I need this for..

We have rules setup for our alerts that when the number of occurences hits a certain point different people are emailed or text messages are sent.

For example. Every 5 occurences of a server ping is sent to a tech.
But the alert isn't sent to management until 20 occurences.

So what I would like to do.. I would like to send out a "Condition Normal" email when the problem is fixed. But if only 10 occurences happened I just want the email to go to the tech. Only if the occurences where greater than 20 do I want the conditional normal email to go to management.

I don't management to get emails when the problem is fixed if there were never alerted of the problem.

So I would need to know the total occurences there were while it was in a "Bad" state.

Does that make sense?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

So, what the problem with "action depends on bad one" option? I think it works just like you need.
For example. Every 5 occurences of a server ping is sent to a tech.
But if only 10 occurences happened I just want the email to go to the tech
Its not a mistake? You want to send "bad" mail when 5 errors occurs and send "good" email when test changed status to "ok" and test failed for 10 times in a row? In such cases your tech stuff may receive bad mail without received good mail even if problem was fixed. Strange logic :roll:

Regards
Alex
DewaltGuy
Posts: 4
Joined: Fri Feb 09, 2007 4:05 pm

Post by DewaltGuy »

Maybe that "Action depends on "bad" one " will work for me. I looked at it again but in the drop down I don't see my "bad" actions (except for one of them).

In my bad actions I have about 6 email actions and 1 SQL action.. The drop down for that only shows me my SQL action. Is there something I am missing.

I appreciate you help and discussion on this topic.
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Only "standard mode" "Bad" actions may be used with "Action depends on 'bad' one" option. If about 6 email actions you mentioned in previous post are the "advanced mode" acions, they will not be listed in Action depends on 'bad' one" dropdown.

In your case, I can see the following solution:
In your action profile should be two "Bad" "Send Email" actions:
First action should be "advanced mode" action with expression ( ('%SimpleStatus%'=='DOWN') and (%Recurrences% mod 5==0) and (%Recurrences%<>20)) will send e-mail to the tech staff after 5th, 10th, 15th, 25th,30th, etc. consecutive failed test probes (except 20). Second "Send email" action should be "standard mode" with "Start when 20 consecutive "Bad" resullts occur" and "Repeat 1 time(s)" options will send email to the tech only once after 20th consecutive failed test probes.

Now you may create "Good" email action, that should send mail to management and make it dependent on foregoing second "bad" email action.

Regards,
Max
Last edited by KS-Soft Europe on Thu Feb 15, 2007 9:42 am, edited 1 time in total.
DewaltGuy
Posts: 4
Joined: Fri Feb 09, 2007 4:05 pm

Post by DewaltGuy »

Thanks.

That makes sense now.. I will give that a try..
Appreciate your help!

Trevor
Post Reply