-
Problem report
-
Resolution: Fixed
-
Blocker
-
None
-
None
-
None
-
None
-
Latest SNMP gateway
-
Support backlog
-
2
Steps to reproduce:
With a snmp-gateway configuration of "CountAcknowledgeStatus": "unacknowledged", some acknowledged triggers are still counted towards the total, while others are not.
Expected:
Patch example:
this mode counts only triggers with the last event in unacknowledged status. --- README.md | 2 +- zabbixAPI/conn.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 196215d..d67601a 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ Here is example of configuration file with default values: ], "Hostgroups": { "CountUnknown": false, // Count triggers in an unknown state or not - "CountAcknowledgeStatus": "all", // Count triggers with all/acknowledged/unacknowledged events + "CountAcknowledgeStatus": "all", // Count triggers with all/acknowledged/unacknowledged/lastunacknowledged events "BaseOID": "1.3.6.1.4.1.3046.7.55.10.11", "Groups": [ { diff --git a/zabbixAPI/conn.go b/zabbixAPI/conn.go index 9e4e158..b50b229 100644 --- a/zabbixAPI/conn.go +++ b/zabbixAPI/conn.go @@ -18,6 +18,8 @@ const ( EventAck = "acknowledged" // EventUnAck filter value for returning triggers with events in unacknowledged status. EventUnAck = "unacknowledged" + // EventLastUnAck filter value for returning triggers with the last event in unacknowledged status. + EventLastUnAck = "lastunacknowledged" jsonRPCVersion = "2.0" rpcType = "application/json-rpc" @@ -155,6 +157,8 @@ func (c *Connection) GetHostGroupTriggers(count bool, eventStatus, groupName str p.WithAcknowledgedEvents = true case EventUnAck: p.WithUnacknowledgedEvents = true + case EventLastUnAck: + p.HideAcknowledged = true } return c.getTriggers(p) -- 2.45.1.windows.1
- related to
-
ZBX-25817 Zabbix SNMP-Gateway not working on 7.2
- READY TO DEVELOP