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

Agent2 SMART commands for discovery seems hardcoded

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 6.4.6
    • Agent2 plugin (N)
    • None

      When using the SMART by Zabbix Agent 2 template, some disks are not discovered if not attached to a set of predefined controllers, and dmesg log is flooded with error messages (see screenshot dmesg.png and agent2log.png).

       

      Result:
      Agent2 log reveals that only the following smartctl device types are attempted (see screenshot agent2log.png):

      sudo -n smartctl -a /dev/sdo -d 3ware,0 -j

      sudo -n smartctl -a /dev/sdo -d sat -j

      sudo -n smartctl -a /dev/sdo -d areca -j

      sudo -n smartctl -a /dev/sdo -d cciss -j
      Expected:

      If manually running command:

      sudo -n smartctl -a /dev/sdo -d scsi -j

      Data is returned as expected, without errors in dmesg. See screenshot smartctl_scsi.png.

       

      Suggested fix:

      Implement a more dynamic way of detecting which device type a disk is using when agent2 is running smart.disk.discovery

      Or

      Add a macro in the template that makes it possible to add additional device types to the discovery operation, so the agent will check for these as well, besides the four hardcoded ones.

        1. agent2log.png
          agent2log.png
          491 kB
        2. dmesg.png
          dmesg.png
          104 kB
        3. smartctl_scsi.png
          smartctl_scsi.png
          107 kB

            bmickiewicz Bartosz Mickiewicz
            maws Mads Wallin
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: