[ZBX-21661] Zabbix Agent 2. ZBX_NOTSUPPORTED: A counter with a negative value was detected. Created: 2022 Sep 16  Updated: 2024 Feb 16

Status: Confirmed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 5.0.27
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Evgeny Kravchenko Assignee: Zabbix Integration Team
Resolution: Unresolved Votes: 9
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBX-21703 Zabbix Agent2 is no longer retrieving... Reopened

 Description   

The ZBX-20269 issue is back. With IIS, but with different performance counters. Unfortunately, the problem is reproduced only on really working web applications and is not stable: you have to try several times.

~$ zabbix_get -s example.host.com -k 'perf_counter_en[\W3SVC_W3WP(*_DefaultAppPool)\% 500 HTTP Response Sent,60]'
0.000000
~$ zabbix_get -s example.host.com -k 'perf_counter_en[\W3SVC_W3WP(*_DefaultAppPool)\% 500 HTTP Response Sent,60]'
0.000000
~$ zabbix_get -s example.host.com -k 'perf_counter_en[\W3SVC_W3WP(*_DefaultAppPool)\% 500 HTTP Response Sent,60]'
0.000000
~$ zabbix_get -s example.host.com -k 'perf_counter_en[\W3SVC_W3WP(*_DefaultAppPool)\% 500 HTTP Response Sent,60]'
0.000000
~$ zabbix_get -s example.host.com -k 'perf_counter_en[\W3SVC_W3WP(*_DefaultAppPool)\% 500 HTTP Response Sent,60]'
0.000000
...
~$ zabbix_get -s stage-app02.stage.dev.flexicapture.com -k 'perf_counter_en[\W3SVC_W3WP(*_Example Web Services)\% 500 HTTP Response Sent,60]'
0.000000
~$ zabbix_get -s stage-app02.stage.dev.flexicapture.com -k 'perf_counter_en[\W3SVC_W3WP(*_Example Web Services)\% 500 HTTP Response Sent,60]'
0.000000
~$ zabbix_get -s stage-app02.stage.dev.flexicapture.com -k 'perf_counter_en[\W3SVC_W3WP(*_Example Web Services)\% 500 HTTP Response Sent,60]'
ZBX_NOTSUPPORTED: A counter with a negative value was detected.
~$ zabbix_get -s stage-app02.stage.dev.flexicapture.com -k 'perf_counter_en[\W3SVC_W3WP(*_Example Web Services)\% 500 HTTP Response Sent,60]'
ZBX_NOTSUPPORTED: A counter with a negative denominator value was detected.
~$ zabbix_get -s stage-app02.stage.dev.flexicapture.com -k 'perf_counter_en[\W3SVC_W3WP(*_Example Web Services)\% 500 HTTP Response Sent,60]'
ZBX_NOTSUPPORTED: A counter with a negative denominator value was detected.
~$ zabbix_get -s stage-app02.stage.dev.flexicapture.com -k 'perf_counter_en[\W3SVC_W3WP(*_Example Web Services)\% 500 HTTP Response Sent,60]'
0.000000

Steps to reproduce (first variant):

  1. Use zabbix agent 2 on IIS host with real working .Net application
  2. From zabbix server try repeating it repeatedly: zabbix_get -s example.host.com -k 'perf_counter_en[\W3SVC_W3WP(*_Example Web Services)\% 500 HTTP Response Sent,60]'

Result:
See errors ZBX_NOTSUPPORTED: A counter with a negative denominator value was detected. or ZBX_NOTSUPPORTED: A counter with a negative denominator value was detected.

Steps to reproduce (second variant):

  1. Create Discovery rule with key perf_instance_en.discovery[APP_POOL_WAS] and Item prototype with key perf_counter_en[\W3SVC_W3WP(*_ {#INSTANCE}
    )% 500 HTTP Response Sent,60]
  1. Wait for performance counter items was created on IIS host with real working .Net application
  2. Look for records in zabbix_agent2.log

Result:
See a lots of records:

Detected performance counter with negative denominator the second time after retry, giving up...

See some records:

check 'perf_counter_en[\W3SVC_W3WP(*_Example Web Services)\% 500 HTTP Response Sent,60]' is not supported: A counter with a negative denominator value was detected.

Workarround:
"Downgrade" to the classic zabbix agent. Perfomance counters works right.



 Comments   
Comment by Vladislavs Sokurenko [ 2023 Aug 25 ]

Confirmed, we should do as in ZBX-20356 and retry on failed query

Generated at Wed Jul 16 11:33:55 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.