[ZBXNEXT-9493] zabbix-agent2 SMART plugin do not detect disks behind megaraid or aacraid (adaptec raid) Created: 2022 Feb 21  Updated: 2025 Apr 22

Status: READY TO DEVELOP
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent2 plugin (G)
Affects Version/s: 6.0.34rc1, 7.0.4rc1, 7.2.0alpha1
Fix Version/s: 7.0.13rc1, 7.2.7rc1, 7.4.0rc1 (master)

Type: Change Request Priority: Trivial
Reporter: Sergey Belyashov Assignee: Eriks Sneiders
Resolution: Unresolved Votes: 8
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Debian Linux (bullseye)


Attachments: Text File aacraid-1.txt     Text File aacraid-2.txt     Text File megaraid-1.txt     Text File megaraid-2.txt    
Team: Team INT

 Description   

Steps to reproduce:

  1. server with adaptec RAID controller Series 7 or LSI MegaRAID
  2. zabbix_agent2 default installation
  3. sudoers config for zabbix user to use smartctl

Result:
Because smartctl -scan do not detect aacraid devices (even with -d sat too), so I use basic /usr/local/sbin/smartctl wrapper which prints on "-scan" option required list of devices using json format:

 

{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      2
    ],
    "svn_revision": "5155",
    "platform_info": "x86_64-linux-5.10.0-11-amd64",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "--scan",
      "-j"
    ],
    "exit_status": 0
  },
  "devices": [
    {
      "name": "/dev/sda",
      "info_name": "/dev/sda",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [adaptec_disk_02]",
      "type": "aacraid,0,0,2",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [adaptec_disk_03]",
      "type": "aacraid,0,0,3",
      "protocol": "SCSI"
    }
  ]
}

 

Pure "/usr/sbin/smartctl -d aacraid,0,0,2 -a /dev/bus/0" returns SMART information about disk.

Same with megaraid, but no wrapper is required.

but zabbix_get results empty array:

 

$ zabbix_get -s 127.0.0.1 -k'smart.disk.discovery'
[]

 

 

Expected:
list of drives as zabbix_get result



 Comments   
Comment by Stefan [ 2022 Sep 15 ]

any news? The template/smart monitoring capabilities, are useless at the moment.
I just got my 2 nvmes instead of all SAS harddisks:

[{"{#NAME}":"nvme1","{#DISKTYPE}":"nvme","{#MODEL}":"Micron_2200_MTFDHBA256TCK","{#SN}":"19292D86AB48"},{"{#NAME}":"nvme0","{#DISKTYPE}":"nvme","{#MODEL}":"Micron_2200_MTFDHBA256TCK","{#SN}":"19292D86AB6C"}]
Comment by Rudolfs Zvejs (Inactive) [ 2024 Jan 15 ]

Help needed


Hello Work on this issue has been started by the Zabbix dev team. Because of the hardware nature of smartmontools it's rarely possible to test features/changes locally As developers and even integrations tests are limited by the hardware available.
To speed up development of this feature it would be really helpful if anyone interested could run smartctl on available environments and share the command outputs.
We are interested in the following command outputs:
smartctl -j -V

smartctl --scan -j

smartctl --scan -d sat -j

smartctl -a $DEVICE_NAME -j

smartctl -a $DEVICE_NAME -d $DEVICE_TYPE -j
We are specially interested in aacraid devices.
smartctl -d "aacraid,0,0,${id}" -a $DEVICE_NAME -j
 
An in-depth explanation of each command invocation can be found below.
We are not perfect, if you think you know better what commands need to be run to get smart information from your environment, feel free to share them and their outputs.
If you need any help or have any questions, contact [email protected]

Version

We need to know what smart version of smartctl you are running.
smartctl -j -V

All devices scan

What devices are available on the system.
smartctl --scan -j

Raid devices scan

What raid devices are available on the system.
smartctl --scan -d sat -j

Get basic device info

smartctl -a $DEVICE_NAME -j

  • $DEVICE_NAME - .devices[n].name field from all devices scan

Run for all devices returned by All devices scan command that are not also returned by Raid devices scan command. (in set theory therms relative compliment of All devices scan with respect to Raid devices scan (All devices scan \ Raid devices scan))

Get raid device info

smartctl -a $DEVICE_NAME -d $DEVICE_TYPE -j

  • $DEVICE_NAME - .devices[n].name field from raid devices scan
  • $DEVICE_TYPE
    • ${type},${id} - for types (example 3ware,0 or areca,1)
      • ${type} - 3warearecacciss
      • ${id} - for areca type id starts at 1, for all others at 0
    • ${type} - for sat types
    • aacraid,0,0,${id} - for aacraid types

Run for all devices returned by Raid devices scan where .devices[n].type does not contain megaraid.

Get megaraid device info

smartctl -a $DEVICE_NAME -d $DEVICE_TYPE -j

  • $DEVICE_NAME - .devices[n].name field from raid devices scan
  • $DEVICE_TYPE - .devices[n].type field from raid devices scan

Run for all devices returned by Raid devices scan where .devices[n].type contains megaraid.

Comment by Sergey Belyashov [ 2024 Jan 15 ]

AACRAID:

smartctl -j -V

{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      3
    ],
    "svn_revision": "5338",
    "platform_info": "x86_64-linux-5.10.0-21-amd64",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "-j",
      "-V"
    ],
    "exit_status": 0
  }
}

smartctl --scan -j

{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      3
    ],
    "svn_revision": "5338",
    "platform_info": "x86_64-linux-5.10.0-21-amd64",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "--scan",
      "-j"
    ],
    "exit_status": 0
  },
  "devices": [
    {
      "name": "/dev/sda",
      "info_name": "/dev/sda",
      "type": "scsi",
      "protocol": "SCSI"
    }
  ]
}

smartctl --scan -d sat -j

{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      3
    ],
    "svn_revision": "5338",
    "platform_info": "x86_64-linux-5.10.0-21-amd64",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "--scan",
      "-d",
      "sat",
      "-j"
    ],
    "exit_status": 0
  },
  "devices": [
    {
      "name": "/dev/sda",
      "info_name": "/dev/sda",
      "type": "scsi",
      "protocol": "SCSI"
    }
  ]
}

smartctl -a -j /dev/sda

{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      3
    ],
    "svn_revision": "5338",
    "platform_info": "x86_64-linux-5.10.0-21-amd64",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "-a",
      "-j",
      "/dev/sda"
    ],
    "exit_status": 4
  },
  "local_time": {
    "time_t": 1705310471,
    "asctime": "Mon Jan 15 12:21:11 2024 MSK"
  },
  "device": {
    "name": "/dev/sda",
    "info_name": "/dev/sda",
    "type": "scsi",
    "protocol": "SCSI"
  },
  "scsi_vendor": "ASR7160",
  "scsi_product": "raid1",
  "scsi_model_name": "ASR7160 raid1",
  "scsi_revision": "V1.0",
  "user_capacity": {
    "blocks": 7811870720,
    "bytes": 3999677808640
  },
  "logical_block_size": 512,
  "physical_block_size": 16384,
  "rotation_rate": 0,
  "logical_unit_id": "0x2e04d3f800d00000",
  "serial_number": "F8D3042E",
  "device_type": {
    "scsi_terminology": "Peripheral Device Type [PDT]",
    "scsi_value": 0,
    "name": "disk"
  },
  "smart_support": {
    "available": true,
    "enabled": true
  },
  "temperature_warning": {
    "enabled": false
  },
  "smart_status": {
    "passed": true
  },
  "temperature": {
    "current": 0
  },
  "scsi_temperature": {
    "drive_trip": 0
  }
}

smartctl -d "aacraid,0,0,2" -a /dev/sda -j > aacraid-1.txt

smartctl -d "aacraid,0,0,3" -a /dev/sda -j > aacraid-2.txt


MEGARAID:

smartctl -j -V

{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      3
    ],
    "svn_revision": "5338",
    "platform_info": "x86_64-linux-5.10.0-22-amd64",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "-j",
      "-V"
    ],
    "exit_status": 0
  }
}

smartctl --scan -j

{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      3
    ],
    "svn_revision": "5338",
    "platform_info": "x86_64-linux-5.10.0-22-amd64",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "--scan",
      "-j"
    ],
    "exit_status": 0
  },
  "devices": [
    {
      "name": "/dev/sda",
      "info_name": "/dev/sda",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_06]",
      "type": "megaraid,6",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_07]",
      "type": "megaraid,7",
      "protocol": "SCSI"
    }
  ]
}

smartctl --scan -d sat -j

{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      3
    ],
    "svn_revision": "5338",
    "platform_info": "x86_64-linux-5.10.0-22-amd64",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "--scan",
      "-d",
      "sat",
      "-j"
    ],
    "exit_status": 0
  },
  "devices": [
    {
      "name": "/dev/sda",
      "info_name": "/dev/sda",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_06]",
      "type": "megaraid,6",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_07]",
      "type": "megaraid,7",
      "protocol": "SCSI"
    }
  ]
}

smartctl -a -j /dev/sda

{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      3
    ],
    "svn_revision": "5338",
    "platform_info": "x86_64-linux-5.10.0-22-amd64",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "-a",
      "-j",
      "/dev/sda"
    ],
    "messages": [
      {
        "string": "Smartctl open device: /dev/sda failed: DELL or MegaRaid controller, please try adding '-d megaraid,N'",
        "severity": "error"
      }
    ],
    "exit_status": 2
  },
  "local_time": {
    "time_t": 1705311221,
    "asctime": "Mon Jan 15 12:33:41 2024 MSK"
  }
}

smartctl /dev/sda -a -d megaraid,6 -j megaraid-1.txt

smartctl /dev/sda -a -d megaraid,7 -j megaraid-2.txt 

Comment by Elbandi [ 2024 Feb 04 ]

Proxmox, debian bullseye.

smartctl -j -V

{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      2
    ],
    "svn_revision": "5155",
    "platform_info": "x86_64-linux-5.15.85-1-pve",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "-j",
      "-V"
    ],
    "exit_status": 0
  }
}

smartctl --scan -j

{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      2
    ],
    "svn_revision": "5155",
    "platform_info": "x86_64-linux-5.15.85-1-pve",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "--scan",
      "-j"
    ],
    "exit_status": 0
  },
  "devices": [
    {
      "name": "/dev/sda",
      "info_name": "/dev/sda",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdb",
      "info_name": "/dev/sdb",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdc",
      "info_name": "/dev/sdc",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdd",
      "info_name": "/dev/sdd",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sde",
      "info_name": "/dev/sde",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdf",
      "info_name": "/dev/sdf",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_06]",
      "type": "megaraid,6",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_07]",
      "type": "megaraid,7",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_08]",
      "type": "megaraid,8",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_09]",
      "type": "megaraid,9",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_10]",
      "type": "megaraid,10",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_11]",
      "type": "megaraid,11",
      "protocol": "SCSI"
    }
  ]
}

smartctl --scan -d sat -j

{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      2
    ],
    "svn_revision": "5155",
    "platform_info": "x86_64-linux-5.15.85-1-pve",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "--scan",
      "-d",
      "sat",
      "-j"
    ],
    "exit_status": 0
  },
  "devices": [
    {
      "name": "/dev/sda",
      "info_name": "/dev/sda",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdb",
      "info_name": "/dev/sdb",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdc",
      "info_name": "/dev/sdc",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdd",
      "info_name": "/dev/sdd",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sde",
      "info_name": "/dev/sde",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/sdf",
      "info_name": "/dev/sdf",
      "type": "scsi",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_06]",
      "type": "megaraid,6",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_07]",
      "type": "megaraid,7",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_08]",
      "type": "megaraid,8",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_09]",
      "type": "megaraid,9",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_10]",
      "type": "megaraid,10",
      "protocol": "SCSI"
    },
    {
      "name": "/dev/bus/0",
      "info_name": "/dev/bus/0 [megaraid_disk_11]",
      "type": "megaraid,11",
      "protocol": "SCSI"
    }
  ]
}

smartctl -a /dev/sda -j
(Note: stripped the smart attributes)

{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      2
    ],
    "svn_revision": "5155",
    "platform_info": "x86_64-linux-5.15.85-1-pve",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "-a",
      "/dev/sda",
      "-j"
    ],
    "exit_status": 0
  },
  "device": {
    "name": "/dev/sda",
    "info_name": "/dev/sda [SAT]",
    "type": "sat",
    "protocol": "ATA"
  },
  "model_family": "Western Digital Red",
  "model_name": "WDC WD100EFAX-68LHPN0",
  "serial_number": "1DGP57BZ",
  "wwn": {
    "naa": 5,
    "oui": 3274,
    "id": 10415087476
  },
  "firmware_version": "83.H0A83",
  "user_capacity": {
    "blocks": 19532873728,
    "bytes": 10000831348736
  },
  "logical_block_size": 512,
  "physical_block_size": 4096,
  "rotation_rate": 5400,
  "form_factor": {
    "ata_value": 2,
    "name": "3.5 inches"
  },
  "trim": {
    "supported": false
  },
  "in_smartctl_database": true,
  "ata_version": {
    "string": "ACS-2, ATA8-ACS T13/1699-D revision 4",
    "major_value": 1020,
    "minor_value": 41
  },
  "sata_version": {
    "string": "SATA 3.2",
    "value": 255
  },
  "interface_speed": {
    "max": {
      "sata_value": 14,
      "string": "6.0 Gb/s",
      "units_per_second": 60,
      "bits_per_unit": 100000000
    },
    "current": {
      "sata_value": 3,
      "string": "6.0 Gb/s",
      "units_per_second": 60,
      "bits_per_unit": 100000000
    }
  },
  "local_time": {
    "time_t": 1707049048,
    "asctime": "Sun Feb  4 13:17:28 2024 CET"
  },
  "smart_status": {
    "passed": true
  },
  "ata_smart_data": {
    "offline_data_collection": {
      "status": {
        "value": 130,
        "string": "was completed without error",
        "passed": true
      },
      "completion_seconds": 93
    },
    "self_test": {
      "status": {
        "value": 0,
        "string": "completed without error",
        "passed": true
      },
      "polling_minutes": {
        "short": 2,
        "extended": 1169
      }
    },
    "capabilities": {
      "values": [
        91,
        3
      ],
      "exec_offline_immediate_supported": true,
      "offline_is_aborted_upon_new_cmd": false,
      "offline_surface_scan_supported": true,
      "self_tests_supported": true,
      "conveyance_self_test_supported": false,
      "selective_self_test_supported": true,
      "attribute_autosave_enabled": true,
      "error_logging_supported": true,
      "gp_logging_supported": true
    }
  },
  "ata_sct_capabilities": {
    "value": 61,
    "error_recovery_control_supported": true,
    "feature_control_supported": true,
    "data_table_supported": true
  },
  "ata_smart_attributes": {
    "revision": 16,
    "table": [
      {
        "id": 1,
        "name": "Raw_Read_Error_Rate",
        "value": 100,
        "worst": 100,
        "thresh": 16,
        "when_failed": "",
        "flags": {
          "value": 11,
          "string": "PO-R-- ",
          "prefailure": true,
          "updated_online": true,
          "performance": false,
          "error_rate": true,
          "event_count": false,
          "auto_keep": false
        },
        "raw": {
          "value": 0,
          "string": "0"
        }
      },
.....

    ]
  },
  "power_on_time": {
    "hours": 50015
  },
  "power_cycle_count": 10,
  "temperature": {
    "current": 28
  },
  "ata_smart_error_log": {
    "summary": {
      "revision": 1,
      "count": 0
    }
  },
  "ata_smart_self_test_log": {
    "standard": {
      "revision": 1,
      "count": 0
    }
  },
  "ata_smart_selective_self_test_log": {
    "revision": 1,
    "table": [
      {
        "lba_min": 0,
        "lba_max": 0,
        "status": {
          "value": 0,
          "string": "Not_testing"
        }
      },
      {
        "lba_min": 0,
        "lba_max": 0,
        "status": {
          "value": 0,
          "string": "Not_testing"
        }
      },
      {
        "lba_min": 0,
        "lba_max": 0,
        "status": {
          "value": 0,
          "string": "Not_testing"
        }
      },
      {
        "lba_min": 0,
        "lba_max": 0,
        "status": {
          "value": 0,
          "string": "Not_testing"
        }
      },
      {
        "lba_min": 0,
        "lba_max": 0,
        "status": {
          "value": 0,
          "string": "Not_testing"
        }
      }
    ],
    "flags": {
      "value": 0,
      "remainder_scan_enabled": false
    },
    "power_up_scan_resume_minutes": 0
  }
}

smartctl -a /dev/bus/0 -d megaraid,11 -j
(Note: stripped the smart attributes)

{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      2
    ],
    "svn_revision": "5155",
    "platform_info": "x86_64-linux-5.15.85-1-pve",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "-a",
      "-d",
      "megaraid,11",
      "/dev/bus/0",
      "-j"
    ],
    "messages": [
      {
        "string": "Warning: This result is based on an Attribute check.",
        "severity": "warning"
      }
    ],
    "exit_status": 0
  },
  "device": {
    "name": "/dev/bus/0",
    "info_name": "/dev/bus/0 [megaraid_disk_11] [SAT]",
    "type": "sat+megaraid,11",
    "protocol": "ATA"
  },
  "model_name": "TOSHIBA MD04ACA400",
  "serial_number": "96HGK10EFSAA",
  "wwn": {
    "naa": 5,
    "oui": 57,
    "id": 31338273507
  },
  "firmware_version": "FP2A",
  "user_capacity": {
    "blocks": 7814037168,
    "bytes": 4000787030016
  },
  "logical_block_size": 512,
  "physical_block_size": 4096,
  "rotation_rate": 7200,
  "form_factor": {
    "ata_value": 2,
    "name": "3.5 inches"
  },
  "trim": {
    "supported": false
  },
  "in_smartctl_database": false,
  "ata_version": {
    "string": "ATA8-ACS (minor revision not indicated)",
    "major_value": 504,
    "minor_value": 0
  },
  "sata_version": {
    "string": "SATA 3.0",
    "value": 63
  },
  "interface_speed": {
    "max": {
      "sata_value": 14,
      "string": "6.0 Gb/s",
      "units_per_second": 60,
      "bits_per_unit": 100000000
    },
    "current": {
      "sata_value": 3,
      "string": "6.0 Gb/s",
      "units_per_second": 60,
      "bits_per_unit": 100000000
    }
  },
  "local_time": {
    "time_t": 1707049191,
    "asctime": "Sun Feb  4 13:19:51 2024 CET"
  },
  "smart_status": {
    "passed": true
  },
  "ata_smart_data": {
    "offline_data_collection": {
      "status": {
        "value": 130,
        "string": "was completed without error",
        "passed": true
      },
      "completion_seconds": 120
    },
    "self_test": {
      "status": {
        "value": 0,
        "string": "completed without error",
        "passed": true
      },
      "polling_minutes": {
        "short": 2,
        "extended": 482
      }
    },
    "capabilities": {
      "values": [
        91,
        3
      ],
      "exec_offline_immediate_supported": true,
      "offline_is_aborted_upon_new_cmd": false,
      "offline_surface_scan_supported": true,
      "self_tests_supported": true,
      "conveyance_self_test_supported": false,
      "selective_self_test_supported": true,
      "attribute_autosave_enabled": true,
      "error_logging_supported": true,
      "gp_logging_supported": true
    }
  },
  "ata_sct_capabilities": {
    "value": 61,
    "error_recovery_control_supported": true,
    "feature_control_supported": true,
    "data_table_supported": true
  },
  "ata_smart_attributes": {
    "revision": 16,
    "table": [
      {
        "id": 1,
        "name": "Raw_Read_Error_Rate",
        "value": 100,
        "worst": 100,
        "thresh": 50,
        "when_failed": "",
        "flags": {
          "value": 11,
          "string": "PO-R-- ",
          "prefailure": true,
          "updated_online": true,
          "performance": false,
          "error_rate": true,
          "event_count": false,
          "auto_keep": false
        },
        "raw": {
          "value": 0,
          "string": "0"
        }
      },
....
    ]
  },
  "power_on_time": {
    "hours": 62720
  },
  "power_cycle_count": 38,
  "temperature": {
    "current": 29
  },
  "ata_smart_error_log": {
    "summary": {
      "revision": 1,
      "count": 0
    }
  },
  "ata_smart_self_test_log": {
    "standard": {
      "revision": 1,
      "count": 0
    }
  },
  "ata_smart_selective_self_test_log": {
    "revision": 1,
    "table": [
      {
        "lba_min": 0,
        "lba_max": 0,
        "status": {
          "value": 0,
          "string": "Not_testing"
        }
      },
      {
        "lba_min": 0,
        "lba_max": 0,
        "status": {
          "value": 0,
          "string": "Not_testing"
        }
      },
      {
        "lba_min": 0,
        "lba_max": 0,
        "status": {
          "value": 0,
          "string": "Not_testing"
        }
      },
      {
        "lba_min": 0,
        "lba_max": 0,
        "status": {
          "value": 0,
          "string": "Not_testing"
        }
      },
      {
        "lba_min": 0,
        "lba_max": 0,
        "status": {
          "value": 0,
          "string": "Not_testing"
        }
      }
    ],
    "flags": {
      "value": 0,
      "remainder_scan_enabled": false
    },
    "power_up_scan_resume_minutes": 0
  }
}
Comment by Elbandi [ 2024 Feb 04 ]

I think this isssue is related to ZBX-23789. If i add the comma char to regexp, my megaraid devices are in disk.discovery. And aacraid,0,0 has commas too, so filtered by clearString.

Anyway:
zabbix_agent2 -t 'smart.disk.discovery' -v -v -v

2024/02/04 13:53:52.117576 [Smart] stopped looking for RAID devices of megaraid,11 type, err: failed to parse RAID disk data from smartctl: Invalid characters found in parameter '/dev/bus/0 -d megaraid,11'.
Comment by Nikita Khokhlachev [ 2024 Aug 28 ]
@zabbix_agent2 -t 'smart.disk.discovery' -v

says:

...
2024/08/28 12:54:06.113440 [Smart] failed to get device "/dev/sda" info by type "areca": Smartctl returned error: Smartctl open device: /dev/sda [areca_disk#01_enc#01] 
failed: Input/output error. 
2024/08/28 12:54:06.113460 [Smart] failed to get device "/dev/sda" info by type "cciss": Smartctl returned error: Smartctl open device: /dev/sda [cciss_disk_00] [SCSI/S
AT] failed: INQUIRY [SAT]: No such device or address. 
2024/08/28 12:54:06.113587 [Smart] failed to get device "/dev/sda" info by type "sat": Smartctl returned error: unknown error from smartctl. 
2024/08/28 12:54:06.113600 [Smart] failed to get device "/dev/sda" info by type "scsi": Smartctl returned no smart status. 
2024/08/28 12:54:06.113620 [Smart] failed to get device "/dev/sda" info by type "3ware": Smartctl returned error: unknown error from smartctl. 
2024/08/28 12:54:06.113725 [Smart] executing smartctl command: sudo -n smartctl -a /dev/bus/0 -d megaraid,18 -j 
2024/08/28 12:54:06.113764 [Smart] executing smartctl command: sudo -n smartctl -a /dev/bus/0 -d megaraid,21 -j 
2024/08/28 12:54:06.113775 [Smart] executing smartctl command: sudo -n smartctl -a /dev/bus/0 -d megaraid,22 -j 
2024/08/28 12:54:06.113803 [Smart] executing smartctl command: sudo -n smartctl -a /dev/bus/0 -d megaraid,20 -j 
2024/08/28 12:54:06.113834 [Smart] executing smartctl command: sudo -n smartctl -a /dev/bus/0 -d megaraid,23 -j 
2024/08/28 12:54:06.113883 [Smart] executing smartctl command: sudo -n smartctl -a /dev/bus/0 -d megaraid,19 -j 
2024/08/28 12:54:06.113980 [Smart] executing smartctl command: sudo -n smartctl -a /dev/bus/0 -d megaraid,24 -j 
2024/08/28 12:54:06.114107 [Smart] executing smartctl command: sudo -n smartctl -a /dev/bus/0 -d megaraid,25 -j 
2024/08/28 12:54:07.992247 executed direct exporter task for key 'smart.disk.discovery[[]]' 
smart.disk.discovery                          [s|[{"{#NAME}":"bus/0 megaraid,19","{#DISKTYPE}":"hdd","{#MODEL}":"","{#SN}":"WKD0C4M70000E0047UWM","{#PATH}":"/dev/bus/0"
,"{#RAIDTYPE}":"megaraid,19","{#ATTRIBUTES}":""},{"{#NAME}":"bus/0 megaraid,20","{#DISKTYPE}":"hdd","{#MODEL}":"","{#SN}":"WKD0C4QV0000E0047U7A","{#PATH}":"/dev/bus/0",
"{#RAIDTYPE}":"megaraid,20","{#ATTRIBUTES}":""},{"{#NAME}":"bus/0 megaraid,21","{#DISKTYPE}":"hdd","{#MODEL}":"","{#SN}":"WKD06XNG0000E95076ZT","{#PATH}":"/dev/bus/0","
{#RAIDTYPE}":"megaraid,21","{#ATTRIBUTES}":""},{"{#NAME}":"bus/0 megaraid,22","{#DISKTYPE}":"hdd","{#MODEL}":"","{#SN}":"WKD0C4N70000E0047V0Z","{#PATH}":"/dev/bus/0","{
#RAIDTYPE}":"megaraid,22","{#ATTRIBUTES}":""},{"{#NAME}":"bus/0 megaraid,23","{#DISKTYPE}":"hdd","{#MODEL}":"","{#SN}":"WKD0C4FR0000E002JEVB","{#PATH}":"/dev/bus/0","{#
RAIDTYPE}":"megaraid,23","{#ATTRIBUTES}":""},{"{#NAME}":"bus/0 megaraid,24","{#DISKTYPE}":"hdd","{#MODEL}":"","{#SN}":"WKD0C4LC0000E0047Q8T","{#PATH}":"/dev/bus/0","{#R
AIDTYPE}":"megaraid,24","{#ATTRIBUTES}":""},{"{#NAME}":"bus/0 megaraid,25","{#DISKTYPE}":"hdd","{#MODEL}":"","{#SN}":"WKD0C4AB0000E0011FQ1","{#PATH}":"/dev/bus/0","{#RA
IDTYPE}":"megaraid,25","{#ATTRIBUTES}":""},{"{#NAME}":"bus/0 megaraid,18","{#DISKTYPE}":"hdd","{#MODEL}":"","{#SN}":"WKD0C4AP0000E950749M","{#PATH}":"/dev/bus/0","{#RAI
DTYPE}":"megaraid,18","{#ATTRIBUTES}":""}]] 
2024/08/28 12:54:07.992338 manager has been stopped

But in the "latest data" from the server I can see only info about sda.

 

Template "SMART by Zabbix agent 2 active" is linked to host.

zabbix_agent2 (Zabbix) 7.0.3

P.S. Fixed by

echo "zabbix ALL=(ALL) NOPASSWD:/usr/sbin/smartctl" > /etc/sudoers.d/zabbix

Generated at Wed Apr 23 15:21:00 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.