Use warning status if

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
Prometheus
Posts: 60
Joined: Wed Mar 09, 2016 1:23 am

Use warning status if

Post by Prometheus »

Hi guys,

I have a question, just like many other people here. I got a series of 6 tests, and I want to see a warning if one of them fails, and an error if two or more of them fail.

Does anybody know how to do this? Below you see 1 out of the 6 tests. They all test the same, but they run their test on other machines.

Method = Tcp
;--- Common properties ---
DestFolder =
Title = CHK-055, Connection Gateway Machine1 failed for, ILV, 70
Comment =
RelatedURL =
ScheduleMode= Regular
Schedule = Geen restrictie
Interval = 600
Alerts = DBA - SLA - 14x6 (Repeating)
ReverseAlert= No
UnknownIsBad= Yes
WarningIsBad= No
UseWarning = Yes
WarningExpr =
UseCommonLog= Yes
PrivLogMode = Default
CommLogMode = Default
SyncCounters= Yes
SyncAlerts = No
DependsOn = list
MasterTest-Alive = Ping - Machine1 - DMZ
;--- Test specific properties ---
Host = 1.2.3.4
Port = 60801
DataToSend = GWM:DAT
CheckReply = Yes
AlertMode = ReplyDoesntContainData
CheckData = TRUE




Thanks everyone!

Kind regards,
Jeffrey
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Where exactly you want to see "warning/error"?
Do you want to change status of any test from "No answer" to "Warning" if only one of these tests returns "No answer" status?
I think you may put all tests into one folder and use option "Use Warning status if (('%SuggestedSimpleStatus%'=='DOWN') and (%::Root\FolderName::FolderCurrent_BadTests%==0)) or ((%::Root\FolderName::FolderCurrent_BadTests%==1) and ('%SimpleStatus%'=='DOWN'))

use real path to the folder instead Root\FolderName

Regards
Alex
Prometheus
Posts: 60
Joined: Wed Mar 09, 2016 1:23 am

Post by Prometheus »

Hi Alex thank you for your answer. I put all the test in one folder, and I renamed the Root\FolderName to my real folder name. But in my real folder name are spaces and hash tags, can this be why it doesn't work?

Kind regards,
Jeffrey
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Spaces and hash tag should not be a problem for folder name.

Could you try the following expression:
((%FailureIteration%==1) and (%::Root\FolderName::FolderCurrent_BadTests%+%FolderCurrent_WarningTests%==0)) OR ((%FailureIteration%>1) and (%::Root\FolderName::FolderCurrent_BadTests%+%FolderCurrent_WarningTests%==1))

Note1: This Warning expression should be applied to all test items within folder.
Note2: If you do not want do get alerts if only one test item has "Warning" status, you should disable "Treat Warning as Bad" option for all test items within folder.
Prometheus
Posts: 60
Joined: Wed Mar 09, 2016 1:23 am

Post by Prometheus »

YES you made it work! :D

This was the one that worked:
((%FailureIteration%==1) and (%::Root\FolderName::FolderCurrent_BadTests%+%FolderCurrent_WarningTests%==0))

I put all the tests in the same folder and this works like a charm. Thank you for your help.

Kind regards,
Jeffrey
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

You are welcome.
Post Reply