[ZBX-25042] {$SNMP.TIMEOUT} ignored by "No SNMP data collection" triggers Created: 2024 Aug 14  Updated: 2025 Jul 03

Status: READY TO DEVELOP
Project: ZABBIX BUGS AND ISSUES
Component/s: Templates (T)
Affects Version/s: 7.0.2, 7.0.3rc1
Fix Version/s: 7.0.17rc1, 7.4.1rc1, 8.0.0alpha1 (master)

Type: Problem report Priority: Trivial
Reporter: user185953 Assignee: Zabbix Integration Team
Resolution: Unresolved Votes: 0
Labels: discard, discard_unchanged, trigger
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2024-08-15-15-29-21-991.png     PNG File image-2024-08-29-14-18-50-566.png    
Team: Team INT
Sprint: Sprint candidates

 Description   

Steps to reproduce:

  1. Use any default SNMP template
  2. Set {$SNMP.TIMEOUT} macro to 10m
  3. Wait 10m
  4. SNMP service goes down

Result:
"No SNMP data collection" trigger ignores {$SNMP.TIMEOUT} and fires immediately

Expected:
"No SNMP data collection" trigger fires after {$SNMP.TIMEOUT}

 

This issue affects all templates that have Discard unchanged with hearbeat on SNMP agent availability item. I count 36 SNMP templates in 5 template folders like this:

  • net/cisco/cisco_asav_snmp/
  • net/zyxel_snmp/
  • power/apc/
  • server/cisco_ucs_manager_snmp/
  • server/dell/ server/hp/

 

Generally, doing good triggers with Discard unchanged with heartbeat items is surprisingly hard.



 Comments   
Comment by Alexander Vladishev [ 2024 Aug 14 ]

I was able to reproduce this issue, but only with the UnreachablePeriod=1 setting in the server configuration file. Do you also have this parameter value reduced?

I also discovered another issue. The trigger transitions to the PROBLEM state only after an hour because the item on which the trigger is based has a throttling interval of 1 hour.

Comment by user185953 [ 2024 Aug 15 ]

No, UnreachablePeriod is default (45), but that can still be right. I write "immediately" but more accurate is that trigger fired before I walked back. It was few minutes, but definitely less than half of {$SNMP.TIMEOUT}. Sorry for misunderstanding.

Yes, I originally wanted to report this second thing you mention that notification arrive late, thank you for reminding me.
Maybe it depends on when failure happens compared to discarding hearbeat? I actually don't know how min() and max() work with missing data. Is there documentation I can read?

Comment by Alexander Vladishev [ 2024 Aug 15 ]

Here is the documentation for the aggregation functions:

https://www.zabbix.com/documentation/current/en/manual/appendix/functions/aggregate

Comment by user185953 [ 2024 Aug 15 ]

Thank you, but it says nothing about handling of missing data. Only thing I find is https://www.zabbix.com/documentation/current/en/manual/config/triggers#evaluation-period. If this is accurate, then it is easy:

 

Or put differently: Doing good triggers on items that discard/throttle is even harder than I expected.

Comment by Alexander Vladishev [ 2024 Aug 15 ]

The trigger expression is calculated at the moment when a new value is received. If there is no data within the calculated period (for example, when using time shift), the trigger is set to "Unknown" status with the corresponding error.

Comment by user185953 [ 2024 Aug 29 ]

So it is more like interface fail is new value so it passes discard/throttle and causes calculation at time of fail:

 

By this you must create item & trigger, wait for 1st data, wait more than {$SNMP.TIMEOUT} but less than (throttling heartbeat minus UnreachablePeriod), then cause interface fail. This should calculate max() on window with only that red "fail" value and cause immediate trigger fire.

Generated at Fri Jul 18 08:36:34 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.