Ad Widget

Collapse

Empty Performance Counter Items Always in Queue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Avg-IT-Guy
    Junior Member
    • Oct 2025
    • 2

    #1

    Empty Performance Counter Items Always in Queue

    Zabbix Server Version: 6.4.13
    Zabbix Server OS: Debian 12
    Zabbix Proxy Version: 6.4.7
    Agent Version: Agent 2 v6.4.19

    Hello!

    I have a template with several items that retrieve various performance counters against Windows Hyper-V Hypervisors.

    A handful of the hosts that have this template assigned, do not currently have any virtual machines.
    As such, some of the performance counters do not contain any data, which is to be expected.

    The items querying the blank counters seem to indefinitely be in the Zabbix queue.
    I am assuming this is because the agent does not send the results of the empty counter to the Zabbix Server.
    Is this the expected behavior of the agent?
    I know I could write a PowerShell script to query the counter with my own error logic and etc., but I was curious as to if this was intended or if there was anyway to resolve this using the native perf_counter[] key.

    For reference, these are the counters I see this with:
    Code:
    perf_counter[\Hyper-V Hypervisor Virtual Processor(_Total)\% Guest Run Time]
    perf_counter[\Hyper-V Hypervisor Virtual Processor(_Total)\% Hypervisor Run Time]
    perf_counter[\Hyper-V Hypervisor Virtual Processor(_Total)\% Remote Run Time]
    perf_counter[\Hyper-V Hypervisor Virtual Processor(_Total)\% Total Run Time]

    Any input would be greatly appreciated!

    Thanks in advance!
  • Viktors Fomics
    Member
    • Oct 2025
    • 52

    #2
    Hello

    This behavior makes sense because the item expects a numeric value. When no such value exists, the agent returns nothing or an error, which causes the item to remain in the queue. Using preprocessing would be recommended, specifically, the “Check for error sing regular expression" to catch empty or error values. You can define an appropriate regular expression pattern to match these cases and enable “Custom on fail” with the desired action (for example, discard it or set the value to 0).

    Comment

    • Avg-IT-Guy
      Junior Member
      • Oct 2025
      • 2

      #3
      Thanks for the response!

      I configured preprocessing logic to set the value to 0 if it is blank or non-numerical, but it doesn't appear to make any difference.
      I believe the issue is the agent doesn't send the blank value to the server.
      (At least, during the few minutes I spent looking at debug logs, it didn't seem like it had attempted to send them.)

      If the agent were sending a blank or invalid value, shouldn't the item show as unsupported?
      Unfortunately, these items do not show as unsupported or report any errors.

      In any case, I appreciate the assistance!
      Thanks!

      Comment

      Working...