Hi! I want to start action based on time difference between test previous status change and current status change time. For example i need to set snmp value if time difference last status change and current status time is less than 30 minutes. I try to use expression: ('%SimpleStatus%'=='DOWN') and ('%StatusChangedTime%'-'%PreviousStatusTime%'<00:30:00)
But it didn't work
What i do wrong? How i can trigger action based on time difference?
Logical expression to start action
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
%StatusChangedTime% and %PreviousStatusTime% variables return string/text values.
They can be compared, but cannot be calculated (added, subtracted ,etc)
As I understand you correctly, you need to use expression like the following:
('%SimpleStatus%'=='DOWN') and ('%CurrentStatusDuration%' < '00:30:00')
or
('%SimpleStatus%'=='DOWN') and (%CurrentStatusDuration_sec% < 1800)
Please check for details at:
http://www.ks-soft.net/hostmon.eng/mfra ... #currmacro
They can be compared, but cannot be calculated (added, subtracted ,etc)
As I understand you correctly, you need to use expression like the following:
('%SimpleStatus%'=='DOWN') and ('%CurrentStatusDuration%' < '00:30:00')
or
('%SimpleStatus%'=='DOWN') and (%CurrentStatusDuration_sec% < 1800)
Please check for details at:
http://www.ks-soft.net/hostmon.eng/mfra ... #currmacro
This is not exactly what i need. For example - test going down then up. If after that test going down within 30 minutes then i need trigger an action.KS-Soft Europe wrote: As I understand you correctly, you need to use expression like the following:
('%SimpleStatus%'=='DOWN') and ('%CurrentStatusDuration%' < '00:30:00')
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Could you make some examples to explain what you need?
E.g.
10:00:00 TestItem01 Status: Ok
10:20:00 TestItem01 Status: Bad <Start Action/Alert>
10:40:00 TestItem01 Status: Bad <No Action should be triggered>
11:00:00 TestItem01 Status: Ok
11:35:00 TestItem01 Status: Bad <No Action should be triggered>
11:55:00 TestItem01 Status: Bad <No Action should be triggered>
Is this correct example?
E.g.
10:00:00 TestItem01 Status: Ok
10:20:00 TestItem01 Status: Bad <Start Action/Alert>
10:40:00 TestItem01 Status: Bad <No Action should be triggered>
11:00:00 TestItem01 Status: Ok
11:35:00 TestItem01 Status: Bad <No Action should be triggered>
11:55:00 TestItem01 Status: Bad <No Action should be triggered>
Is this correct example?
Example1:KS-Soft Europe wrote:Could you make some examples to explain what you need?
10:00:00 TestItem01 Status: Ok
10:20:00 TestItem01 Status: Bad <No Action should be triggered>
10:40:00 TestItem01 Status: Ok
10:45:00 TestItem01 Status: Bad <Start Action/Alert>
In this example between current bad and last Ok status took less than 30 minutes and i need start action
Example2:
10:00:00 TestItem01 Status: Ok
10:20:00 TestItem01 Status: Bad <No Action should be triggered>
10:40:00 TestItem01 Status: Ok
11:15:00 TestItem01 Status: Bad <No Action should be triggered>
In this example between current bad and last Ok status took more than 30 minutes and no action should be triggered
I want to catch often bad/ok status changes
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact: