Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-26797

Agent triggering massive smartctl commands repeatedly and fails discovery of disks

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • 7.0.16
    • Agent2 (G)
    • None
    • Agent side environment:

      Ubuntu 22.04.5 LTS, 5.15.0-134-generic #145-Ubuntu SMP Wed Feb 12 20:08:39 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux.

      zabbix-agent2 1:7.0.3-1+ubuntu22.04 amd64
      smartmontools 7.2-1ubuntu0.1 amd64

      Steps to reproduce:

      1. We configured our Ubuntu 22.04 physical server to be monitored in Zabbix Server 7.0.13 and used the bundled SMART monitoring template.
      2. We found that the SMART disk discovery is not working as expected. It will interrupt and report as unsupported due to a timeout.
      3. Actually, part of the disks on the agent host is being discovered (two NVMe disks), and only one SATA SSD is not being found.
      4. By manually triggering the smartctl --scan command, I can get all my disks and then get expected metrics.
      5. By manually testing using the command zabbix_agent2 -v -t smart.disk.discovery I can reproduce the error. So, I believe the problem is on the agent side, not the server side.

      Result:

      See log file...

      The Zabbix agent repeatedly calls the smartctl command to get the metrics for /dev/sda. It seems that the command was valid and should return results to the Zabbix agent, but the agent is still trying quickly (~5 times per second) and endlessly until the one-minute deadline, eating system resources and I/O.

      ...
      2025/08/05 14:24:19.277230 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sda -d cciss,0 -j                                                                                                                                                                                                                                              2025/08/05 14:24:19.420272 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sda -d cciss,0 -j                                                                                                                                                                                                                                              2025/08/05 14:24:19.551476 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sda -d cciss,0 -j                                                                                                                                                                                                                                              2025/08/05 14:24:19.740409 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sda -d cciss,0 -j                                                                                                                                                                                                                                              2025/08/05 14:24:19.943972 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sda -d cciss,0 -j
      ... 

      Expected:

      We expect the Zabbix agent trigger the following command at the desired monitoring frequency and return proper results for autodiscovery and monitoring items.

            zabbix.dev Zabbix Development Team
            helixzz Zijing Guo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: