Hi guys!
I'm wanting to do something a little odd with triggers to address a need - effectively wanting to pass the latest data from two items to be in the trigger name visible on the dashboard etc until it is no longer a problem.
The only way I've thought about achieving this to have the latest values is to make the trigger "flap" to cause the new trigger to replace the macros with the latest value, however haven't yet been able to achieve this so that it is constantly there (at least to the user).
Zabbix Version: 2.4.8
Items:
Trigger Name: "Disk {#DISK_NUMBER} at {#DISK_LOCATION} {ITEM.VALUE1} ({ITEM.VALUE2})"
Trigger Expression:
({TRIGGER.VALUE}=0 and {host:status.regexp("resuming")}=1 and {host:eta.strlen(#1)}>1)
The expression triggers as expected and then clears, however it does it at every data change (as designed) meaning it toggles on/off leaving a gap where it does not appear on the dashboard before reappearing at next data change. I thought about using a time value to cause this to be every 30 seconds, but again there is a slight gap where it is not visible for some time instead of appearing to be there constantly.
So expected event log would be something like;
Time Description Status Severity Duration
2018-07-30 16:50:35 Disk 40 in location 21:8:0 is resuming (1h 55m) Problem Information 5m
2018-07-30 16:45:36 Disk 40 in location 21:8:0 is resuming (2h) OK Information 1s
2018-07-30 16:40:35 Disk 40 in location 21:8:0 is resuming (2h) Problem Information 5m
Currently it is more like;
Time Description Status Severity Duration
2018-07-30 16:55:35 Disk 40 in location 21:8:0 is resuming (1h 55m) Problem Information 5m
2018-07-30 16:50:36 Disk 40 in location 21:8:0 is resuming (2h) OK Information 5m
2018-07-30 16:40:35 Disk 40 in location 21:8:0 is resuming (2h) Problem Information 5m
Any ideas?
I'm wanting to do something a little odd with triggers to address a need - effectively wanting to pass the latest data from two items to be in the trigger name visible on the dashboard etc until it is no longer a problem.
The only way I've thought about achieving this to have the latest values is to make the trigger "flap" to cause the new trigger to replace the macros with the latest value, however haven't yet been able to achieve this so that it is constantly there (at least to the user).
Zabbix Version: 2.4.8
Items:
- status (External script that polls a SAN every 5m)
- stores a string of current state (e.g. "resuming", "failed")
- eta (Zabbix trapper that receives values from external script)
- stores either a estimated time to address issue or "no eta available" otherwise (for failed state)
Trigger Name: "Disk {#DISK_NUMBER} at {#DISK_LOCATION} {ITEM.VALUE1} ({ITEM.VALUE2})"
Trigger Expression:
({TRIGGER.VALUE}=0 and {host:status.regexp("resuming")}=1 and {host:eta.strlen(#1)}>1)
The expression triggers as expected and then clears, however it does it at every data change (as designed) meaning it toggles on/off leaving a gap where it does not appear on the dashboard before reappearing at next data change. I thought about using a time value to cause this to be every 30 seconds, but again there is a slight gap where it is not visible for some time instead of appearing to be there constantly.
So expected event log would be something like;
Time Description Status Severity Duration
2018-07-30 16:50:35 Disk 40 in location 21:8:0 is resuming (1h 55m) Problem Information 5m
2018-07-30 16:45:36 Disk 40 in location 21:8:0 is resuming (2h) OK Information 1s
2018-07-30 16:40:35 Disk 40 in location 21:8:0 is resuming (2h) Problem Information 5m
Currently it is more like;
Time Description Status Severity Duration
2018-07-30 16:55:35 Disk 40 in location 21:8:0 is resuming (1h 55m) Problem Information 5m
2018-07-30 16:50:36 Disk 40 in location 21:8:0 is resuming (2h) OK Information 5m
2018-07-30 16:40:35 Disk 40 in location 21:8:0 is resuming (2h) Problem Information 5m
Any ideas?
Comment