Ad Widget

Collapse

Discussion thread for official Zabbix SMART Disk monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • anmg
    replied
    I figured out the correct command. but it does not return SMART data
    Code:
    # smartctl -a -d aacraid,0,0,2 /dev/sdb
    smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.8.0-57-generic] (local build)
    Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org
    
    === START OF INFORMATION SECTION ===
    Vendor: WDC
    Product: WD8004FRYZ-01VAE
    Revision: 01.0
    Compliance: SPC-3
    User Capacity: 8,001,563,222,016 bytes [8.00 TB]
    Logical block size: 512 bytes
    Rotation Rate: 7200 rpm
    Form Factor: 3.5 inches
    Logical Unit id: 0x5000cca0c6c0c5fe
    Serial number: VYG1PS1S
    Device type: disk
    Local Time is: Sun Apr 6 08:21:44 2025 UTC
    SMART support is: Available - device has SMART capability.
    SMART support is: Enabled
    Temperature Warning: Disabled or Not Supported
    
    === START OF READ SMART DATA SECTION ===
    SMART Health Status: OK
    Current Drive Temperature: <not available>
    Drive Trip Temperature: 0 C
    
    Error Counter logging not supported
    
    Device does not support Self Test logging
    SMART returned by shorter way:
    Code:
    # smartctl -d sat --all /dev/sg2
    smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.8.0-57-generic] (local build)
    Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org
    
    === START OF INFORMATION SECTION ===
    Model Family:     Seagate Constellation ES (SATA 6Gb/s)
    Device Model:     ST1000NM0011
    Serial Number:    Z1N3PT9G
    LU WWN Device Id: 5 000c50 04ffd8372
    Firmware Version: SN03
    User Capacity:    1,000,204,886,016 bytes [1.00 TB]
    Sector Size:      512 bytes logical/physical
    Rotation Rate:    7202 rpm
    Form Factor:      3.5 inches
    Device is:        In smartctl database 7.3/5671
    ATA Version is:   ATA8-ACS T13/1699-D revision 4
    SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
    Local Time is:    Sun Apr  6 08:23:51 2025 UTC
    SMART support is: Available - device has SMART capability.
    SMART support is: Enabled
    
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
    
    General SMART Values:
    Offline data collection status:  (0x82)    Offline data collection activity
                        was completed without error.
                        Auto Offline Data Collection: Enabled.
    Self-test execution status:      (   0)    The previous self-test routine completed
                        without error or no self-test has ever
                        been run.
    Total time to complete Offline
    data collection:         (  617) seconds.
    Offline data collection
    capabilities:              (0x7b) SMART execute Offline immediate.
                        Auto Offline data collection on/off support.
                        Suspend Offline collection upon new
                        command.
                        Offline surface scan supported.
                        Self-test supported.
                        Conveyance Self-test supported.
                        Selective Self-test supported.
    SMART capabilities:            (0x0003)    Saves SMART data before entering
                        power-saving mode.
                        Supports SMART auto save timer.
    Error logging capability:        (0x01)    Error logging supported.
                        General Purpose Logging supported.
    Short self-test routine
    recommended polling time:      (   1) minutes.
    Extended self-test routine
    recommended polling time:      ( 155) minutes.
    Conveyance self-test routine
    recommended polling time:      (   2) minutes.
    SCT capabilities:            (0x10bd)    SCT Status supported.
                        SCT Error Recovery Control supported.
                        SCT Feature Control supported.
                        SCT Data Table supported.
    
    SMART Attributes Data Structure revision number: 10
    Vendor Specific SMART Attributes with Thresholds:
    ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
      1 Raw_Read_Error_Rate     0x000f   082   063   044    Pre-fail  Always       -       179926209
      3 Spin_Up_Time            0x0003   094   094   000    Pre-fail  Always       -       0
      4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       13
      5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       8
      7 Seek_Error_Rate         0x000f   093   060   030    Pre-fail  Always       -       2300887577
      9 Power_On_Hours          0x0032   069   011   000    Old_age   Always       -       27971
     10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
     12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       13
    184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
    187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
    188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0
    189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
    190 Airflow_Temperature_Cel 0x0022   063   056   045    Old_age   Always       -       37 (Min/Max 37/37)
    191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
    192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       12
    193 Load_Cycle_Count        0x0032   091   091   000    Old_age   Always       -       18547
    194 Temperature_Celsius     0x0022   037   044   000    Old_age   Always       -       37 (0 16 0 0 0)
    195 Hardware_ECC_Recovered  0x001a   118   099   000    Old_age   Always       -       179926209
    197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
    198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
    199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
    
    SMART Error Log Version: 1
    No Errors Logged
    
    SMART Self-test log structure revision number 1
    Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
    # 1  Short offline       Completed without error       00%     27958         -
    # 2  Extended offline    Aborted by host               90%     27958         -
    # 3  Short offline       Aborted by host               80%     27958         -
    
    SMART Selective self-test log data structure revision number 1
     SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
        1        0        0  Not_testing
        2        0        0  Not_testing
        3        0        0  Not_testing
        4        0        0  Not_testing
        5        0        0  Not_testing
    Selective self-test flags (0x0):
      After scanning selected spans, do NOT read-scan remainder of disk.
    If Selective self-test is pending on power-up, resume after 0 minute delay.
    
    The above only provides legacy SMART information - try 'smartctl -x' for more
    ​

    Leave a comment:


  • anmg
    replied
    output from zabbix-agent2 debug log
    Code:
    2025/04/06 08:10:58.201837 [Smart] executed smartctl command: sudo -n smartctl -j -V Got output: "{\n \"json_format_version\": [\n 1,\n 0\n ],\n \"smartctl\": {\n \"version\": [\n 7,\n 4\n ],\n \"pre_release\": false,\n \"svn_revision\": \"5530\",\n \"platform_info\": \"x86_64-linux-6.8.0-57-generic\",\n \"build_info\": \"(local build)\",\n \"argv\": [\n \"smartctl\",\n \"-j\",\n \"-V\"\n ],\n \"exit_status\": 0\n }\n}\n"
    2025/04/06 08:10:58.230345 [Smart] executed smartctl command: sudo -n smartctl --scan -j Got output: "{\n \"json_format_version\": [\n 1,\n 0\n ],\n \"smartctl\": {\n \"version\": [\n 7,\n 4\n ],\n \"pre_release\": false,\n \"svn_revision\": \"5530\",\n \"platform_info\": \"x86_64-linux-6.8.0-57-generic\",\n \"build_info\": \"(local build)\",\n \"argv\": [\n \"smartctl\",\n \"--scan\",\n \"-j\"\n ],\n \"exit_status\": 0\n },\n \"devices\": [\n {\n \"name\": \"/dev/sda\",\n \"info_name\": \"/dev/sda\",\n \"type\": \"scsi\",\n \"protocol\": \"SCSI\"\n },\n {\n \"name\": \"/dev/sdb\",\n \"info_name\": \"/dev/sdb\",\n \"type\": \"scsi\",\n \"protocol\": \"SCSI\"\n }\n ]\n}\n"
    2025/04/06 08:10:58.258211 [Smart] executed smartctl command: sudo -n smartctl --scan -d sat -j Got output: "{\n \"json_format_version\": [\n 1,\n 0\n ],\n \"smartctl\": {\n \"version\": [\n 7,\n 4\n ],\n \"pre_release\": false,\n \"svn_revision\": \"5530\",\n \"platform_info\": \"x86_64-linux-6.8.0-57-generic\",\n \"build_info\": \"(local build)\",\n \"argv\": [\n \"smartctl\",\n \"--scan\",\n \"-d\",\n \"sat\",\n \"-j\"\n ],\n \"exit_status\": 0\n },\n \"devices\": [\n {\n \"name\": \"/dev/sda\",\n \"info_name\": \"/dev/sda\",\n \"type\": \"scsi\",\n \"protocol\": \"SCSI\"\n },\n {\n \"name\": \"/dev/sdb\",\n \"info_name\": \"/dev/sdb\",\n \"type\": \"scsi\",\n \"protocol\": \"SCSI\"\n }\n ]\n}\n"
    2025/04/06 08:10:58.286087 [Smart] failed to get device "/dev/sda" info by type "scsi": Failed to execute smartctl: "{\n \"json_format_version\": [\n 1,\n 0\n ],\n \"smartctl\": {\n \"version\": [\n 7,\n 4\n ],\n \"pre_release\": false,\n \"svn_revision\": \"5530\",\n \"platform_info\": \"x86_64-linux-6.8.0-57-generic\",\n \"build_info\": \"(local build)\",\n \"argv\": [\n \"smartctl\",\n \"-a\",\n \"-d\",\n \"scsi\",\n \"/dev/sda\",\n \"-j\"\n ],\n \"exit_status\": 4\n },\n \"local_time\": {\n \"time_t\": 1743927058,\n \"asctime\": \"Sun Apr 6 08:10:58 2025 UTC\"\n },\n \"device\": {\n \"name\": \"/dev/sda\",\n \"info_name\": \"/dev/sda\",\n \"type\": \"scsi\",\n \"protocol\": \"SCSI\"\n },\n \"scsi_vendor\": \"Adaptec\",\n \"scsi_product\": \"spegel\",\n \"scsi_model_name\": \"Adaptec spegel\",\n \"scsi_revision\": \"V1.0\",\n \"user_capacity\": {\n \"blocks\": 1952428032,\n \"bytes\": 999643152384\n },\n \"logical_block_size\": 512,\n \"physical_block_size\": 4096,\n \"rotation_rate\": 0,\n \"logical_unit_id\": \"0xa5280ce500d00000\",\n \"serial_number\": \"E50C28A5\",\n \"device_type\": {\n \"scsi_terminology\": \"Peripheral Device Type [PDT]\",\n \"scsi_value\": 0,\n \"name\": \"disk\"\n },\n \"smart_support\": {\n \"available\": true,\n \"enabled\": true\n },\n \"temperature_warning\": {\n \"enabled\": false\n },\n \"smart_status\": {\n \"passed\": true\n },\n \"temperature\": {\n \"current\": 0,\n \"drive_trip\": 0\n },\n \"seagate_farm_log\": {\n \"supported\": false\n }\n}": exit status 4.
    2025/04/06 08:10:58.293485 [Smart] failed to get device "/dev/sdb" info by type "areca": Failed to execute smartctl: "{\n \"json_format_version\": [\n 1,\n 0\n ],\n \"smartctl\": {\n \"version\": [\n 7,\n 4\n ],\n \"pre_release\": false,\n \"svn_revision\": \"5530\",\n \"platform_info\": \"x86_64-linux-6.8.0-57-generic\",\n \"build_info\": \"(local build)\",\n \"argv\": [\n \"smartctl\",\n \"-a\",\n \"-d\",\n \"areca,1\",\n \"/dev/sdb\",\n \"-j\"\n ],\n \"messages\": [\n {\n \"string\": \"Smartctl open device: /dev/sdb [areca_disk#01_enc#01] failed: Input/output error\",\n \"severity\": \"error\"\n }\n ],\n \"exit_status\": 2\n },\n \"local_time\": {\n \"time_t\": 1743927058,\n \"asctime\": \"Sun Apr 6 08:10:58 2025 UTC\"\n }\n}": exit status 2.
    2025/04/06 08:10:58.293565 [Smart] failed to get device "/dev/sda" info by type "cciss": Failed to execute smartctl: "{\n \"json_format_version\": [\n 1,\n 0\n ],\n \"smartctl\": {\n \"version\": [\n 7,\n 4\n ],\n \"pre_release\": false,\n \"svn_revision\": \"5530\",\n \"platform_info\": \"x86_64-linux-6.8.0-57-generic\",\n \"build_info\": \"(local build)\",\n \"argv\": [\n \"smartctl\",\n \"-a\",\n \"-d\",\n \"cciss,0\",\n \"/dev/sda\",\n \"-j\"\n ],\n \"messages\": [\n {\n \"string\": \"Smartctl open device: /dev/sda [cciss_disk_00] [SCSI/SAT] failed: INQUIRY [SAT]: No such device or address\",\n \"severity\": \"error\"\n }\n ],\n \"exit_status\": 2\n },\n \"local_time\": {\n \"time_t\": 1743927058,\n \"asctime\": \"Sun Apr 6 08:10:58 2025 UTC\"\n }\n}": exit status 2.
    2025/04/06 08:10:58.293707 [Smart] failed to get device "/dev/sda" info by type "3ware": Failed to execute smartctl: "{\n \"json_format_version\": [\n 1,\n 0\n ],\n \"smartctl\": {\n \"version\": [\n 7,\n 4\n ],\n \"pre_release\": false,\n \"svn_revision\": \"5530\",\n \"platform_info\": \"x86_64-linux-6.8.0-57-generic\",\n \"build_info\": \"(local build)\",\n \"argv\": [\n \"smartctl\",\n \"-a\",\n \"-d\",\n \"3ware,0\",\n \"/dev/sda\",\n \"-j\"\n ],\n \"exit_status\": 2\n },\n \"local_time\": {\n \"time_t\": 1743927058,\n \"asctime\": \"Sun Apr 6 08:10:58 2025 UTC\"\n },\n \"device\": {\n \"name\": \"/dev/sda\",\n \"info_name\": \"/dev/sda [3ware_disk_00]\",\n \"type\": \"3ware\",\n \"protocol\": \"ATA\"\n }\n}": exit status 2.
    2025/04/06 08:10:58.294501 [Smart] failed to get device "/dev/sdb" info by type "cciss": Failed to execute smartctl: "{\n \"json_format_version\": [\n 1,\n 0\n ],\n \"smartctl\": {\n \"version\": [\n 7,\n 4\n ],\n \"pre_release\": false,\n \"svn_revision\": \"5530\",\n \"platform_info\": \"x86_64-linux-6.8.0-57-generic\",\n \"build_info\": \"(local build)\",\n \"argv\": [\n \"smartctl\",\n \"-a\",\n \"-d\",\n \"cciss,0\",\n \"/dev/sdb\",\n \"-j\"\n ],\n \"messages\": [\n {\n \"string\": \"Smartctl open device: /dev/sdb [cciss_disk_00] [SCSI/SAT] failed: INQUIRY [SAT]: No such device or address\",\n \"severity\": \"error\"\n }\n ],\n \"exit_status\": 2\n },\n \"local_time\": {\n \"time_t\": 1743927058,\n \"asctime\": \"Sun Apr 6 08:10:58 2025 UTC\"\n }\n}": exit status 2.
    2025/04/06 08:10:58.295144 [Smart] failed to get device "/dev/sda" info by type "sat": Failed to execute smartctl: "{\n \"json_format_version\": [\n 1,\n 0\n ],\n \"smartctl\": {\n \"version\": [\n 7,\n 4\n ],\n \"pre_release\": false,\n \"svn_revision\": \"5530\",\n \"platform_info\": \"x86_64-linux-6.8.0-57-generic\",\n \"build_info\": \"(local build)\",\n \"argv\": [\n \"smartctl\",\n \"-a\",\n \"-d\",\n \"sat\",\n \"/dev/sda\",\n \"-j\"\n ],\n \"exit_status\": 2\n },\n \"local_time\": {\n \"time_t\": 1743927058,\n \"asctime\": \"Sun Apr 6 08:10:58 2025 UTC\"\n },\n \"device\": {\n \"name\": \"/dev/sda\",\n \"info_name\": \"/dev/sda [SAT]\",\n \"type\": \"sat\",\n \"protocol\": \"ATA\"\n }\n}": exit status 2.
    2025/04/06 08:10:58.304195 [Smart] failed to get device "/dev/sda" info by type "areca": Failed to execute smartctl: "{\n \"json_format_version\": [\n 1,\n 0\n ],\n \"smartctl\": {\n \"version\": [\n 7,\n 4\n ],\n \"pre_release\": false,\n \"svn_revision\": \"5530\",\n \"platform_info\": \"x86_64-linux-6.8.0-57-generic\",\n \"build_info\": \"(local build)\",\n \"argv\": [\n \"smartctl\",\n \"-a\",\n \"-d\",\n \"areca,1\",\n \"/dev/sda\",\n \"-j\"\n ],\n \"messages\": [\n {\n \"string\": \"Smartctl open device: /dev/sda [areca_disk#01_enc#01] failed: Input/output error\",\n \"severity\": \"error\"\n }\n ],\n \"exit_status\": 2\n },\n \"local_time\": {\n \"time_t\": 1743927058,\n \"asctime\": \"Sun Apr 6 08:10:58 2025 UTC\"\n }\n}": exit status 2.
    2025/04/06 08:10:58.305647 [Smart] failed to get device "/dev/sdb" info by type "3ware": Failed to execute smartctl: "{\n \"json_format_version\": [\n 1,\n 0\n ],\n \"smartctl\": {\n \"version\": [\n 7,\n 4\n ],\n \"pre_release\": false,\n \"svn_revision\": \"5530\",\n \"platform_info\": \"x86_64-linux-6.8.0-57-generic\",\n \"build_info\": \"(local build)\",\n \"argv\": [\n \"smartctl\",\n \"-a\",\n \"-d\",\n \"3ware,0\",\n \"/dev/sdb\",\n \"-j\"\n ],\n \"exit_status\": 2\n },\n \"local_time\": {\n \"time_t\": 1743927058,\n \"asctime\": \"Sun Apr 6 08:10:58 2025 UTC\"\n },\n \"device\": {\n \"name\": \"/dev/sdb\",\n \"info_name\": \"/dev/sdb [3ware_disk_00]\",\n \"type\": \"3ware\",\n \"protocol\": \"ATA\"\n }\n}": exit status 2.
    2025/04/06 08:10:58.313750 [Smart] failed to get device "/dev/sdb" info by type "sat": Failed to execute smartctl: "{\n \"json_format_version\": [\n 1,\n 0\n ],\n \"smartctl\": {\n \"version\": [\n 7,\n 4\n ],\n \"pre_release\": false,\n \"svn_revision\": \"5530\",\n \"platform_info\": \"x86_64-linux-6.8.0-57-generic\",\n \"build_info\": \"(local build)\",\n \"argv\": [\n \"smartctl\",\n \"-a\",\n \"-d\",\n \"sat\",\n \"/dev/sdb\",\n \"-j\"\n ],\n \"exit_status\": 2\n },\n \"local_time\": {\n \"time_t\": 1743927058,\n \"asctime\": \"Sun Apr 6 08:10:58 2025 UTC\"\n },\n \"device\": {\n \"name\": \"/dev/sdb\",\n \"info_name\": \"/dev/sdb [SAT]\",\n \"type\": \"sat\",\n \"protocol\": \"ATA\"\n }\n}": exit status 2.
    2025/04/06 08:10:58.321342 [Smart] failed to get device "/dev/sdb" info by type "scsi": Failed to execute smartctl: "{\n \"json_format_version\": [\n 1,\n 0\n ],\n \"smartctl\": {\n \"version\": [\n 7,\n 4\n ],\n \"pre_release\": false,\n \"svn_revision\": \"5530\",\n \"platform_info\": \"x86_64-linux-6.8.0-57-generic\",\n \"build_info\": \"(local build)\",\n \"argv\": [\n \"smartctl\",\n \"-a\",\n \"-d\",\n \"scsi\",\n \"/dev/sdb\",\n \"-j\"\n ],\n \"exit_status\": 4\n },\n \"local_time\": {\n \"time_t\": 1743927058,\n \"asctime\": \"Sun Apr 6 08:10:58 2025 UTC\"\n },\n \"device\": {\n \"name\": \"/dev/sdb\",\n \"info_name\": \"/dev/sdb\",\n \"type\": \"scsi\",\n \"protocol\": \"SCSI\"\n },\n \"scsi_vendor\": \"Adaptec\",\n \"scsi_product\": \"LogicalDrv 1\",\n \"scsi_model_name\": \"Adaptec LogicalDrv 1\",\n \"scsi_revision\": \"V1.0\",\n \"user_capacity\": {\n \"blocks\": 15623759872,\n \"bytes\": 7999365054464\n },\n \"logical_block_size\": 512,\n \"physical_block_size\": 16777216,\n \"rotation_rate\": 0,\n \"logical_unit_id\": \"0x3017d31e00d00000\",\n \"serial_number\": \"1ED31730\",\n \"device_type\": {\n \"scsi_terminology\": \"Peripheral Device Type [PDT]\",\n \"scsi_value\": 0,\n \"name\": \"disk\"\n },\n \"smart_support\": {\n \"available\": true,\n \"enabled\": true\n },\n \"temperature_warning\": {\n \"enabled\": false\n },\n \"smart_status\": {\n \"passed\": true\n },\n \"temperature\": {\n \"current\": 0,\n \"drive_trip\": 0\n },\n \"seagate_farm_log\": {\n \"supported\": false\n }\n}": exit status 4.

    as you can see aacraid is not tested

    Leave a comment:


  • anmg
    replied
    Originally posted by PavelZ
    I thought that zabbix agent2 runs smarctl --scan -d several times according to the number of drivers it knows. Isn't that so?

    Let's update all programs, enable agent logs and see it.
    Thaaks for note
    I can not understand which arguments should I use, and suppose zabbix-agent same.

    Code:
    smartctl --scan -d aacraid,H,L,ID
    as described here https://www.smartmontools.org/wiki/S...Controllers#14

    trying something like this does not give results
    Code:
    smartctl --scan -d aacraid,H,L,ID /dev/sg3
    # scan_smart_devices: DEVICESCAN with pattern not implemented yet

    as to update, I see only this in zabbix-agent2
    Code:
    zabbix-agent2.service - Zabbix Agent 2
    Loaded: loaded (/usr/lib/systemd/system/zabbix-agent2.service; enabled; preset: enabled)
    Active: active (running) since Sat 2025-04-05 19:34:20 UTC; 12h ago
    Main PID: 804 (zabbix_agent2)
    Tasks: 20 (limit: 9405)
    Memory: 26.9M (peak: 47.3M)
    CPU: 1min 4.762s
    CGroup: /system.slice/zabbix-agent2.service
    └─804 /usr/sbin/zabbix_agent2 -c /etc/zabbix/zabbix_agent2.conf
    
    Apr 06 07:05:54 backup-data sudo[6871]: pam_unix(sudo:session): session closed for user root
    Apr 06 07:05:54 backup-data sudo[6883]: zabbix : PWD=/ ; USER=root ; COMMAND=/usr/sbin/smartctl -a /dev/sdb -d sat -j
    Apr 06 07:05:54 backup-data sudo[6884]: zabbix : PWD=/ ; USER=root ; COMMAND=/usr/sbin/smartctl -a /dev/sdb -d scsi -j
    Code:
    # smartctl
    smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.8.0-57-generic] (local build)
    Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

    Leave a comment:


  • PavelZ
    replied
    scan command does not provide useful information
    # sudo -u zabbix smartctl --scan
    I thought that zabbix agent2 runs smarctl --scan -d several times according to the number of drivers it knows. Isn't that so?

    Let's update all programs, enable agent logs and see it.

    Leave a comment:


  • anmg
    replied
    Hello!

    Can not make to gather data from drives on Adaptec RAID controller.
    scan command does not provide useful information
    Code:
    # sudo -u zabbix smartctl --scan
    /dev/sda -d scsi # /dev/sda, SCSI device
    /dev/sdb -d scsi # /dev/sdb, SCSI device
    check RAID controller type:
    Code:
    # lspci | grep RAID
    02:00.0 RAID bus controller: Adaptec Series 6 - 6G SAS/PCIe 2 (rev 01)
    use lsscsi to determine actual drives' names. below is 2 separate Logical Volumes RAID1 each.
    Code:
    # lsscsi -g
    [0:0:0:0] disk Adaptec spegel V1.0 /dev/sda /dev/sg0
    [0:0:1:0] disk Adaptec LogicalDrv 1 V1.0 /dev/sdb /dev/sg1
    [0:1:0:0] disk ST1000NM0011 SN03 - /dev/sg2
    [0:1:1:0] disk ST1000DM003-9YN1 CC46 - /dev/sg3
    [0:1:2:0] disk WDC WD8004FRYZ-01VAE 01.0 - /dev/sg4
    [0:1:3:0] disk WDC WD8004FRYZ-01VAE 01.0 - /dev/sg5
    [0:3:0:0] enclosu ADAPTEC Virtual SGPIO - /dev/sg6

    dmesg output
    Code:
    # dmesg | grep scsi
    [    0.668768] scsi host1: ahci
    [    0.669251] scsi host2: ahci
    [    0.672367] scsi host3: ahci
    [    0.673256] scsi host4: ahci
    [    0.673573] scsi host5: ahci
    [    0.673970] scsi host6: ahci
    [    1.138269] scsi host0: aacraid
    [    1.139214] scsi 0:0:0:0: Direct-Access     Adaptec  spegel           V1.0 PQ: 0 ANSI: 2
    [    1.140236] scsi 0:0:1:0: Direct-Access     Adaptec  LogicalDrv 1     V1.0 PQ: 0 ANSI: 2
    [    1.153685] scsi 0:1:0:0: Direct-Access              ST1000NM0011     SN03 PQ: 1 ANSI: 5
    [    1.156229] scsi 0:1:1:0: Direct-Access              ST1000DM003-9YN1 CC46 PQ: 1 ANSI: 5
    [    1.158421] scsi 0:1:2:0: Direct-Access     WDC      WD8004FRYZ-01VAE 01.0 PQ: 1 ANSI: 5
    [    1.160658] scsi 0:1:3:0: Direct-Access     WDC      WD8004FRYZ-01VAE 01.0 PQ: 1 ANSI: 5
    [    1.191221] scsi 0:3:0:0: Enclosure         ADAPTEC  Virtual SGPIO         PQ: 0 ANSI: 5
    [    1.227400] sd 0:0:0:0: Attached scsi generic sg0 type 0
    [    1.227805] sd 0:0:1:0: Attached scsi generic sg1 type 0
    [    1.228399] scsi 0:1:0:0: Attached scsi generic sg2 type 0
    [    1.230211] scsi 0:1:1:0: Attached scsi generic sg3 type 0
    [    1.230954] scsi 0:1:2:0: Attached scsi generic sg4 type 0
    [    1.232649] scsi 0:1:3:0: Attached scsi generic sg5 type 0
    [    1.232951] scsi 0:3:0:0: Attached scsi generic sg6 type 13
    ​
    And finally I can get actual information from smartctl by for disk name /dev/sg2 - /dev/sg5
    Code:
    # smartctl -d sat --all /dev/sg2


    lsscsi is to be installed, it was not preinstalled on Ubuntu 24.04.

    So may be add more RAID controllers discovery logic to SMART plugin?

    Also any suggestion how to use filters in Zabbix templates? will it be helpful if smartctl --scan does not return valid disk names?

    Leave a comment:


  • PavelZ
    replied
    "smart_status": {
    "passed": false,
    You noticed that there is a failure here, right?
    This is certainly not encouraging. It is possible that Zabbix does not have enough different broken hardware to test the agent's behavior in such situations.

    I suggest recording agent log and the full outputs of all commands so that they can be simulated after replacing the disk.
    Last edited by PavelZ; 26-03-2025, 22:17.

    Leave a comment:


  • PavelZ
    replied
    Don't you want to make sure the zabbix agent version match template version first? I don't see any version information from you.
    It would be stupid to do complex debugging without checking something simple.

    Leave a comment:


  • teiteoer
    replied
    Hello everyone,

    I'm trying to use smart.disk.discovery from the SMART by Zabbix agent 2 template, but I'm getting the following error:

    cannot parse response: cannot find pair with name "value"
    My system has 2x NVMe drives and 1x SATA SSD.

    Here’s what I get when running smartctl -a -j:
    • For the SATA SSD (/dev/sda):
    Code:
    "smart_status": {
    "passed": true
    }
    • For /dev/nvme0:

    Code:
    "smart_status": {
    "passed": true,
    "nvme": {
    "value": 0
    }
    }
    • For /dev/nvme1:​

    Code:
    "smart_status": {
    "passed": false,
    "nvme": {
    "value": 4,
    "spare_below_threshold": false,
    "temperature_above_or_below_threshold": false,
    "reliability_degraded": true,
    "media_read_only": false,
    "volatile_memory_backup_failed": false,
    "persistent_memory_region_unreliable": false,
    "other": 0
    }
    }

    It seems like Zabbix expects a "value" field directly under "smart_status", but NVMe devices return a nested structure instead.

    Has anyone encountered this issue or found a workaround?
    Is this a known limitation, or is there something I can adjust in the template or item configuration to handle NVMe responses properly?

    Any guidance would be appreciated!

    Thanks in advance!

    Leave a comment:


  • PavelZ
    replied
    AlexPRN
    We discussed similar issues a bit above. Could you please clarify what specific disks you have? Are you using raid? What is the operating system version?
    Are you updating the template inside zabbix server when update agent?

    Leave a comment:


  • AlexPRN
    replied
    Hello.
    Current Agent version on Windows aren't work with SMART. When I run
    Code:
    C:\Program Files\Zabbix Agent 2>zabbix_agent2.exe -c zabbix_agent2.conf -t smart.disk.discovery
    on 7.2.x verisons it returns:
    Code:
    smart.disk.discovery                          [m|ZBX_NOTSUPPORTED] [Cannot fetch data.: got error executing worker pool: failed to execute smartctl: "{\r\n  \"json_format_version\": [\r\n  ................... : exit status 32.]
    But on 6.2.9 Agent everything works fine. What's the reason, anyone know?

    Leave a comment:


  • PavelZ
    replied
    As usual, you need to take things apart and check them piece by piece:

    autodiscovery should return list of device name as json.
    filters should filter out /dev/sda and other problematic devices.
    master Items should be created only for those disks that smartctl can query.
    master items should be queried without errors
    dependent items should be calculated from json.

    Leave a comment:


  • INFinite
    replied
    Originally posted by PavelZ
    This filter works during autodiscovery /dev/sda polling will still not work.
    You need to delete the problematic items and run discovery again.
    I disconnected the template from the node with the data deletion, reconnected it, and configured the filter and started detection. The error is the same.
    If I got something wrong, could you describe in more detail what needs to be done.

    Leave a comment:


  • PavelZ
    replied
    This filter works during autodiscovery /dev/sda polling will still not work.
    You need to delete the problematic items and run discovery again.

    Leave a comment:


  • INFinite
    replied
    Originally posted by PavelZ
    Well, what's the problem with a certain number of unsupported items? Other disks are being queried.
    I tried to exclude all disks, but it's still an error
    Code:
    Cannot fetch data.: got error executing worker pool: smartctl returned error: unknown error from smartctl.

    Leave a comment:


  • PavelZ
    replied
    Today, once again trying to find a solution on the Internet, I came across bug report ZBX-26098 with the same problem.​https://support.zabbix.com/projects/...sues/ZBX-26098
    A very similar problem. Similar configuration with Intel software raid 1

    Well, what's the problem with a certain number of unsupported items? Other disks are being queried.​

    Leave a comment:

Working...