Ad Widget

Collapse

Discussion thread for official Zabbix SMART Disk monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TheImmortal
    Junior Member
    • Nov 2020
    • 11

    #61
    Originally posted by ga6QWsJ2dVEF
    I am having some difficulty with this template as the smart.disk.discovery uses random RAID controllers to obtain the SMART stats (see output below), but the only one that works well for me is the scsi device type (specifically: -d scsi -- output not shown, but trust me, it works).

    Code:
     14:31:20.917075 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sda -d 3ware,0 -j
    14:31:20.917116 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdb -d areca,1 -j
    14:31:20.917161 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdh -d sat -j
    14:31:20.917224 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdf -d cciss,0 -j
    14:31:20.917281 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sda -d sat -j
    14:31:20.917315 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdi -d areca,1 -j
    14:31:20.917417 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdb -d 3ware,0 -j
    14:31:20.917482 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdf -d 3ware,0 -j
    14:31:20.917542 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdf -d sat -j
    14:31:20.917592 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdf -d areca,1 -j
    14:31:20.917704 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sde -d cciss,0 -j
    14:31:20.917751 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sda -d areca,1 -j
    14:31:20.917799 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sda -d cciss,0 -j
    14:31:20.917865 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdc -d 3ware,0 -j
    14:31:20.917952 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdi -d 3ware,0 -j
    14:31:20.918036 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdb -d cciss,0 -j
    14:31:20.918150 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdg -d cciss,0 -j
    14:31:20.918316 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdg -d sat -j
    14:31:20.918486 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdh -d cciss,0 -j
    14:31:20.918588 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdb -d sat -j
    14:31:20.918685 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdc -d cciss,0 -j
    14:31:20.918733 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdc -d sat -j
    14:31:20.918838 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdi -d cciss,0 -j
    14:31:20.918925 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdg -d areca,1 -j
    14:31:20.918971 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdi -d sat -j
    14:31:20.919022 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdj -d sat -j
    14:31:20.919139 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdc -d areca,1 -j
    14:31:20.919192 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdh -d 3ware,0 -j
    14:31:20.919263 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdj -d cciss,0 -j
    14:31:20.919362 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdd -d areca,1 -j
    14:31:20.919428 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdj -d 3ware,0 -j
    14:31:20.919803 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sde -d 3ware,0 -j
    14:31:20.919886 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdg -d 3ware,0 -j
    14:31:20.919967 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sde -d sat -j
    14:31:20.920031 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdd -d 3ware,0 -j
    14:31:20.920094 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdd -d cciss,0 -j
    14:31:20.920157 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sde -d areca,1 -j
    14:31:20.920245 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdh -d areca,1 -j
    14:31:20.920425 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdj -d areca,1 -j
    14:31:20.920585 [Smart] executing smartctl command: sudo -n smartctl -a /dev/sdd -d sat -j
    ​
    On the Zabbix template, I tried to set an LLD macro {#RAIDTYPE} and {#RAID} to scsi but this was unsuccessful. I tried to force the Zabbix Agent SMART Plugin executable path to include the full executable path with the -d scsi, and that did not work (don't recommend it, the smart.disk.discovery process keeps continuously looping.

    Any hints? This template gets the correct data only with the SCSI device type, but I have no idea how to set this on the Zabbix Agent2 config or on the Zabbix Template for the host.

    Running into this as well, wondering if you (or someone else, for that matter) managed to find a fix for it.

    Comment

    • torlik
      Junior Member
      • Apr 2023
      • 2

      #62
      Hello,

      Do someone have try to use this template on freebsd?

      My agent conf:
      Code:
      Plugins.Smart.Path=/usr/local/sbin/smartctl
      sudoers
      Code:
      zabbix ALL = (ALL) NOPASSWD : /usr/local/sbin/smartctl
      smartctl 7.3

      But agent returns that:
      Code:
      ~ $ zabbix_get -s localhost -p 10050 -k smart.disk.discovery
      ZBX_NOTSUPPORTED: Unsupported item key.

      Any idea?

      Comment

      • torlik
        Junior Member
        • Apr 2023
        • 2

        #63
        Ok I think I've understand:

        Code:
        unknown parameter \"Plugins.Smart.Path\" in config file \"/usr/local/etc/zabbix6/zabbix_agentd.conf.d/plugins.d/smart.conf\
        On Freebsd, we don't have agent2 version and then we don't provide the right path for smartctl binary.

        Comment

        • solution
          Senior Member
          • Jun 2020
          • 269

          #64
          Use this template and script.
          It is based on Perl.
          I monitor pfsense which is based on FreeBSD with it.
          I've used it with zabix agent since version 5.0 and my zabbix server is currently with 6.4 (newly released)​​




          Wellington

          Comment

          • fl0w
            Junior Member
            • Aug 2021
            • 5

            #65
            Originally posted by fl0w
            Hi,
            I still have an issue on a fresh install on Rocky Linux 8.5 + zabbix-agent2-6.0.4-1.el8.x86_64, I've set up the sudoers file like below:
            Code:
            Defaults:zabbix !requiretty
            zabbix ALL=(ALL) NOPASSWD:/usr/sbin/smartctl
            I've succesfully ran smartctl from zabbix user (after adding /bin/bash in /etc/passwd for testing):
            Code:
            bash-4.4$ sudo smartctl -a /dev/sda
            smartctl 7.1 2020-04-05 r5049 [x86_64-linux-5.17.7-1.el8.elrepo.x86_64] (local build)
            Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
            
            === START OF INFORMATION SECTION ===
            Device Model: TOSHIBA MD04ACA600
            But running zabbix_get from the Zabbix server gets the following error:
            Code:
            bash-4.4$ zabbix_get -s host.domain.tld -k smart.disk.discovery
            ZBX_NOTSUPPORTED: Cannot fetch data: Failed to scan for devices: Cannot unmarshal JSON: invalid character 's' looking for beginning of value..
            Any idea?
            Thanks
            Issue is back. Seems to be an issue with the output of the command...
            Directly from the agent:
            Code:
            [zabbix@server root]$ zabbix_agent2 -t smart.disk.discovery
            smart.disk.discovery                          [s|[{"{#NAME}":"nvme1","{#DISKTYPE}":"nvme","{#MODEL}":"WDS500G3X0C-00SJG0","{#SN}":"192876812345","{#PATH}":"/dev/nvme1","{#RAIDTYPE}":"","{#ATTRIBUTES}":""},{"{#NAME}":"sda sat","{#DISKTYPE}":"hdd","{#MODEL}":"TOSHIBA MD04ACA600","{#SN}":"55O6K0WABCDE","{#PATH}":"/dev/sda","{#RAIDTYPE}":"sat","{#ATTRIBUTES}":"Raw_Read_Error_Rate Throughput_Performance Spin_Up_Time Start_Stop_Count Reallocated_Sector_Ct Seek_Error_Rate Seek_Time_Performance Power_On_Hours Spin_Retry_Count Power_Cycle_Count G-Sense_Error_Rate Power-Off_Retract_Count Load_Cycle_Count Temperature_Celsius Reallocated_Event_Count Current_Pending_Sector Offline_Uncorrectable UDMA_CRC_Error_Count Disk_Shift Loaded_Hours Load_Retry_Count Load_Friction Load-in_Time Head_Flying_Hours"},{"{#NAME}":"sdi sat","{#DISKTYPE}":"hdd","{#MODEL}":"TOSHIBA MD04ACA600","{#SN}":"Z5H1K60ABCDF","{#PATH}":"/dev/sdi","{#RAIDTYPE}":"sat","{#ATTRIBUTES}":"Raw_Read_Error_Rate Throughput_Performance Spin_Up_Time Start_Stop_Count Reallocated_Sector_Ct Seek_Error_Rate Seek_Time_Performance Power_On_Hours Spin_Retry_Count Power_Cycle_Count G-Sense_Error_Rate Power-Off_Retract_Count Load_Cycle_Count Temperature_Celsius Reallocated_Event_Count Current_Pending_Sector Offline_Uncorrectable UDMA_CRC_Error_Count Disk_Shift Loaded_Hours Load_Retry_Count Load_Friction Load-in_Time Head_Flying_Hours"},{"{#NAME}":"sdl sat","{#DISKTYPE}":"hdd","{#MODEL}":"TOSHIBA MD04ACA600","{#SN}":"Z5HEK24ABCDG","{#PATH}":"/dev/sdl","{#RAIDTYPE}":"sat","{#ATTRIBUTES}":"Raw_Read_Error_Rate Throughput_Performance Spin_Up_Time Start_Stop_Count Reallocated_Sector_Ct Seek_Error_Rate Seek_Time_Performance Power_On_Hours Spin_Retry_Count Power_Cycle_Count G-Sense_Error_Rate Power-Off_Retract_Count Load_Cycle_Count Temperature_Celsius Reallocated_Event_Count Current_Pending_Sector Offline_Uncorrectable UDMA_CRC_Error_Count Disk_Shift Loaded_Hours Load_Retry_Count Load_Friction Load-in_Time Head_Flying_Hours"},{"{#NAME}":"sdf sat","{#DISKTYPE}":"hdd","{#MODEL}":"TOSHIBA MD04ACA600","{#SN}":"Z5E7K46ABCDH","{#PATH}":"/dev/sdf","{#RAIDTYPE}":"sat","{#ATTRIBUTES}":"Raw_Read_Error_Rate Throughput_Performance Spin_Up_Time Start_Stop_Count Reallocated_Sector_Ct Seek_Error_Rate Seek_Time_Performance Power_On_Hours Spin_Retry_Count Power_Cycle_Count G-Sense_Error_Rate Power-Off_Retract_Count Load_Cycle_Count Temperature_Celsius Reallocated_Event_Count Current_Pending_Sector Offline_Uncorrectable UDMA_CRC_Error_Count Disk_Shift Loaded_Hours Load_Retry_Count Load_Friction Load-in_Time Head_Flying_Hours"},{"{#NAME}":"nvme0","{#DISKTYPE}":"nvme","{#MODEL}":"CT2000P2SSD8","{#SN}":"2204E6012345","{#PATH}":"/dev/nvme0","{#RAIDTYPE}":"","{#ATTRIBUTES}":""},{"{#NAME}":"sdb sat","{#DISKTYPE}":"hdd","{#MODEL}":"TOSHIBA MD04ACA600","{#SN}":"55O4K0QABCDI","{#PATH}":"/dev/sdb","{#RAIDTYPE}":"sat","{#ATTRIBUTES}":"Raw_Read_Error_Rate Throughput_Performance Spin_Up_Time Start_Stop_Count Reallocated_Sector_Ct Seek_Error_Rate Seek_Time_Performance Power_On_Hours Spin_Retry_Count Power_Cycle_Count G-Sense_Error_Rate Power-Off_Retract_Count Load_Cycle_Count Temperature_Celsius Reallocated_Event_Count Current_Pending_Sector Offline_Uncorrectable UDMA_CRC_Error_Count Disk_Shift Loaded_Hours Load_Retry_Count Load_Friction Load-in_Time Head_Flying_Hours"},{"{#NAME}":"sdc sat","{#DISKTYPE}":"hdd","{#MODEL}":"TOSHIBA MD04ACA600","{#SN}":"Z5E2K5NABCDJ","{#PATH}":"/dev/sdc","{#RAIDTYPE}":"sat","{#ATTRIBUTES}":"Raw_Read_Error_Rate Throughput_Performance Spin_Up_Time Start_Stop_Count Reallocated_Sector_Ct Seek_Error_Rate Seek_Time_Performance Power_On_Hours Spin_Retry_Count Power_Cycle_Count G-Sense_Error_Rate Power-Off_Retract_Count Load_Cycle_Count Temperature_Celsius Reallocated_Event_Count Current_Pending_Sector Offline_Uncorrectable UDMA_CRC_Error_Count Disk_Shift Loaded_Hours Load_Retry_Count Load_Friction Load-in_Time Head_Flying_Hours"},{"{#NAME}":"sde sat","{#DISKTYPE}":"hdd","{#MODEL}":"TOSHIBA MD04ACA600","{#SN}":"Y5JHK1DABCDK","{#PATH}":"/dev/sde","{#RAIDTYPE}":"sat","{#ATTRIBUTES}":"Raw_Read_Error_Rate Throughput_Performance Spin_Up_Time Start_Stop_Count Reallocated_Sector_Ct Seek_Error_Rate Seek_Time_Performance Power_On_Hours Spin_Retry_Count Power_Cycle_Count G-Sense_Error_Rate Power-Off_Retract_Count Load_Cycle_Count Temperature_Celsius Reallocated_Event_Count Current_Pending_Sector Offline_Uncorrectable UDMA_CRC_Error_Count Disk_Shift Loaded_Hours Load_Retry_Count Load_Friction Load-in_Time Head_Flying_Hours"},{"{#NAME}":"sdg sat","{#DISKTYPE}":"hdd","{#MODEL}":"TOSHIBA MD04ACA600","{#SN}":"95ODK0SABCDL","{#PATH}":"/dev/sdg","{#RAIDTYPE}":"sat","{#ATTRIBUTES}":"Raw_Read_Error_Rate Throughput_Performance Spin_Up_Time Start_Stop_Count Reallocated_Sector_Ct Seek_Error_Rate Seek_Time_Performance Power_On_Hours Spin_Retry_Count Power_Cycle_Count G-Sense_Error_Rate Power-Off_Retract_Count Load_Cycle_Count Temperature_Celsius Reallocated_Event_Count Current_Pending_Sector Offline_Uncorrectable UDMA_CRC_Error_Count Disk_Shift Loaded_Hours Load_Retry_Count Load_Friction Load-in_Time Head_Flying_Hours"},{"{#NAME}":"sdh sat","{#DISKTYPE}":"hdd","{#MODEL}":"TOSHIBA MD04ACA600","{#SN}":"95NAK1MABCDM","{#PATH}":"/dev/sdh","{#RAIDTYPE}":"sat","{#ATTRIBUTES}":"Raw_Read_Error_Rate Throughput_Performance Spin_Up_Time Start_Stop_Count Reallocated_Sector_Ct Seek_Error_Rate Seek_Time_Performance Power_On_Hours Spin_Retry_Count Power_Cycle_Count G-Sense_Error_Rate Power-Off_Retract_Count Load_Cycle_Count Temperature_Celsius Reallocated_Event_Count Current_Pending_Sector Offline_Uncorrectable UDMA_CRC_Error_Count Disk_Shift Loaded_Hours Load_Retry_Count Load_Friction Load-in_Time Head_Flying_Hours"},{"{#NAME}":"sdj sat","{#DISKTYPE}":"hdd","{#MODEL}":"TOSHIBA MD04ACA600","{#SN}":"95N7K2AABCDN","{#PATH}":"/dev/sdj","{#RAIDTYPE}":"sat","{#ATTRIBUTES}":"Raw_Read_Error_Rate Throughput_Performance Spin_Up_Time Start_Stop_Count Reallocated_Sector_Ct Seek_Error_Rate Seek_Time_Performance Power_On_Hours Spin_Retry_Count Power_Cycle_Count G-Sense_Error_Rate Power-Off_Retract_Count Load_Cycle_Count Temperature_Celsius Reallocated_Event_Count Current_Pending_Sector Offline_Uncorrectable UDMA_CRC_Error_Count Disk_Shift Loaded_Hours Load_Retry_Count Load_Friction Load-in_Time Head_Flying_Hours"},{"{#NAME}":"sdd sat","{#DISKTYPE}":"hdd","{#MODEL}":"TOSHIBA MD04ACA600","{#SN}":"55O6K0XABCDO","{#PATH}":"/dev/sdd","{#RAIDTYPE}":"sat","{#ATTRIBUTES}":"Raw_Read_Error_Rate Throughput_Performance Spin_Up_Time Start_Stop_Count Reallocated_Sector_Ct Seek_Error_Rate Seek_Time_Performance Power_On_Hours Spin_Retry_Count Power_Cycle_Count G-Sense_Error_Rate Power-Off_Retract_Count Load_Cycle_Count Temperature_Celsius Reallocated_Event_Count Current_Pending_Sector Offline_Uncorrectable UDMA_CRC_Error_Count Disk_Shift Loaded_Hours Load_Retry_Count Load_Friction Load-in_Time Head_Flying_Hours"},{"{#NAME}":"sdk sat","{#DISKTYPE}":"hdd","{#MODEL}":"TOSHIBA MD04ACA600","{#SN}":"Z5H3K3CABCDP","{#PATH}":"/dev/sdk","{#RAIDTYPE}":"sat","{#ATTRIBUTES}":"Raw_Read_Error_Rate Throughput_Performance Spin_Up_Time Start_Stop_Count Reallocated_Sector_Ct Seek_Error_Rate Seek_Time_Performance Power_On_Hours Spin_Retry_Count Power_Cycle_Count G-Sense_Error_Rate Power-Off_Retract_Count Load_Cycle_Count Temperature_Celsius Reallocated_Event_Count Current_Pending_Sector Offline_Uncorrectable UDMA_CRC_Error_Count Disk_Shift Loaded_Hours Load_Retry_Count Load_Friction Load-in_Time Head_Flying_Hours"}]]​
            And from Zabbix server:
            Code:
            bash-5.1$ zabbix_get -s 192.168.0.X -p 10050 -k smart.disk.discovery
            ZBX_NOTSUPPORTED: Cannot fetch data: Failed to scan for devices: Cannot unmarshal JSON: invalid character 's' looking for beginning of value..

            Comment

            • cheneric
              Junior Member
              • Aug 2023
              • 11

              #66
              SMART by Zabbix agent 2​
              https://git.zabbix.com/projects/ZBX/...r/smart_agent2

              SMART by Zabbix agent 2 active

              Comment

              • Taomyn
                Junior Member
                • Feb 2021
                • 21

                #67
                First time using this template and have hit the issue mentioned above by fl0w

                Code:
                2023/09/06 08:19:18.439408 check 'smart.disk.discovery' is not supported: Failed to execute smartctl: Command execution failed: exit status 127.
                2023/09/06 08:20:16.009943 check 'smart.disk.discovery' is not supported: Cannot fetch data: Failed to scan for devices: Cannot unmarshal JSON: invalid character 's' looking for beginning of value..

                Running Zabbix Server v6.4.6 and Agent v6.4.6 on Debian 12

                Comment

                • Taomyn
                  Junior Member
                  • Feb 2021
                  • 21

                  #68
                  Originally posted by Taomyn
                  First time using this template and have hit the issue mentioned above by fl0w

                  Code:
                  2023/09/06 08:19:18.439408 check 'smart.disk.discovery' is not supported: Failed to execute smartctl: Command execution failed: exit status 127.
                  2023/09/06 08:20:16.009943 check 'smart.disk.discovery' is not supported: Cannot fetch data: Failed to scan for devices: Cannot unmarshal JSON: invalid character 's' looking for beginning of value..

                  Running Zabbix Server v6.4.6 and Agent v6.4.6 on Debian 12
                  My bad, seems that sudo is not installed by default, which cured the problem.

                  Comment

                  • advlad
                    Junior Member
                    • Sep 2023
                    • 1

                    #69
                    CentOS 7
                    smartmontools 7.2
                    zabbix agent2 6.4
                    Code:
                    # zabbix_agent2 -t smart.disk.discovery
                    
                    smart.disk.discovery [s|[{"{#NAME}":"sda sat","{#DISKTYPE}":"hdd","{#MODEL}":"ST1000DM003-1ER162","{#SN}":"Z4Y6X6NB","{#PATH}":"/dev/sda","{#RAIDTYPE}":"sat","{#ATTRIBUTES}":"Raw_Rea d _Error_Rate Spin_Up_Time Start_Stop_Count Reallocated_Sector_Ct Seek_Error_Rate Power_On_Hours Spin_Retry_Count Power_Cycle_Count Runtime_Bad_Block End-to-End_Error Reported_Uncorrect Command_Timeout High_Fly_Writes Airflow_Temperature_Cel G-Sense_Error_Rate Power-Off_Retract_Count Load_Cycle_Count Temperature_Celsius Current_Pending_Sector Offline_Uncorrectable UDMA_CRC_Error_Count Head_Flying_Hours Total_LBAs_Written Total_LBAs_Read"},{"{#NAME}":"sdb sat","{#DISKTYPE}":"hdd","{#MODEL}":"ST1000DM003-1ER162","{#SN}":"Z4Y6WWGG","{#PATH}":"/dev/sdb","{#RAIDTYPE}":"sat","{#ATTRIBUTES}":"Raw_Rea d _Error_Rate Spin_Up_Time Start_Stop_Count Reallocated_Sector_Ct Seek_Error_Rate Power_On_Hours Spin_Retry_Count Power_Cycle_Count Runtime_Bad_Block End-to-End_Error Reported_Uncorrect Command_Timeout High_Fly_Writes Airflow_Temperature_Cel G-Sense_Error_Rate Power-Off_Retract_Count Load_Cycle_Count Temperature_Celsius Current_Pending_Sector Offline_Uncorrectable UDMA_CRC_Error_Count Head_Flying_Hours Total_LBAs_Written Total_LBAs_Read"}]]

                    CentOS 8
                    zabbix server 6.4
                    Code:
                    # zabbix_get -s a.b.c.d -p 10050 -k smart.disk.discovery
                    
                    ZBX_NOTSUPPORTED: Cannot fetch data: Failed to scan for devices: Cannot unmarshal JSON: invalid character 's' looking for beginning of value..

                    Is there a way to somehow debug this issue?​

                    Comment

                    • solution
                      Senior Member
                      • Jun 2020
                      • 269

                      #70
                      privileges,,, sudo?


                      added to the /etc/sudoers file the lines
                      Defaults:zabbix !requiretty
                      zabbix ALL=(ALL) NOPASSWD:/usr/sbin/smartctl

                      ***Replace with path correct for smartctl

                      Wellington

                      Comment

                      • qds013
                        Junior Member
                        • Oct 2023
                        • 3

                        #71
                        Hello,

                        I’m trying to setup SMART monitoring with zabbix-agent2 on Centos. Following official manuals, it’s not expected to be complicated – but I’m stuck with:
                        Code:
                        zabbix_agent2 -t smart.disk.discovery
                        smart.disk.discovery [m|ZBX_NOTSUPPORTED] [Failed to execute smartctl: Command execution failed: exit status 1.]
                        ​After completing some basic checks – still have no clue what’s wrong in my setup:
                        Code:
                        zabbix_agent2 -V
                        zabbix_agent2 (Zabbix) 6.4.7
                        
                        smartctl --scan
                        /dev/sda -d scsi # /dev/sda, SCSI device
                        /dev/sdb -d scsi # /dev/sdb, SCSI device
                        /dev/sdc -d scsi # /dev/sdc, SCSI device
                        
                        sudo -u zabbix smartctl --scan
                        /dev/sda -d scsi # /dev/sda, SCSI device
                        /dev/sdb -d scsi # /dev/sdb, SCSI device
                        /dev/sdc -d scsi # /dev/sdc, SCSI device
                        
                        sudo -u zabbix sudo smartctl --scan
                        /dev/sda -d scsi # /dev/sda, SCSI device
                        /dev/sdb -d scsi # /dev/sdb, SCSI device
                        /dev/sdc -d scsi # /dev/sdc, SCSI device
                        
                        cat /etc/sudoers.d/zabbix
                        zabbix ALL= (ALL) NOPASSWD: ALL
                        ​Any idea?

                        Comment

                        • gabrielev
                          Junior Member
                          • Apr 2022
                          • 9

                          #72
                          Originally posted by qds013
                          Hello,

                          I’m trying to setup SMART monitoring with zabbix-agent2 on Centos. Following official manuals, it’s not expected to be complicated – but I’m stuck with:
                          Code:
                          zabbix_agent2 -t smart.disk.discovery
                          smart.disk.discovery [m|ZBX_NOTSUPPORTED] [Failed to execute smartctl: Command execution failed: exit status 1.]
                          You are missing the /etc/sudores.d file.
                          Read the doc of the templates.

                          First try to get working the command:
                          Code:
                           sudo -u zabbix sudo smartctl -i /dev/sda

                          Comment

                          • gabrielev
                            Junior Member
                            • Apr 2022
                            • 9

                            #73
                            Hello,
                            could you add support for detecting SSD wearout ?
                            In https://github.com/v-zhuravlev/zbx-smartctl this was supported.

                            Thanks

                            Comment

                            • Mr.BlueBear
                              Junior Member
                              • Feb 2023
                              • 1

                              #74
                              Originally posted by gabrielev
                              Hello,
                              could you add support for detecting SSD wearout ?
                              In https://github.com/v-zhuravlev/zbx-smartctl this was supported.

                              Thanks
                              As per this post, Media Wearout is already supported with many disk. Mostly those using "percentage used".
                              However, I too have a disk manufacturer / model that is not recognized. SuperMicro Sata-DOM.
                              ID# ATTRIBUTE_NAME FLAG
                              232 Available_Reservd_Space 0x0000

                              Comment

                              • anmg
                                Junior Member
                                • Sep 2021
                                • 14

                                #75
                                I have different results with running smartctl:
                                Code:
                                sudo -u zabbix /usr/local/sbin/smartctl --scan
                                ---- I get only virtual drive

                                Code:
                                sudo -u zabbix sudo /usr/local/sbin/smartctl --scan
                                ---- I get full drive list (screenshot is for both commands)

                                so when i run
                                Code:
                                zabbix_get -shostname -p 10050 -k smart.disk.discovery
                                I have empty reply
                                Code:
                                []
                                smartmotools v. 7.3-7.4
                                zabbix-agent 6.4.10
                                Attached Files
                                Last edited by anmg; 31-01-2024, 18:18.

                                Comment

                                Working...