Ad Widget

Collapse

Discussion thread for official Zabbix SMART Disk monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Taomyn
    replied
    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

    Leave a comment:


  • cheneric
    replied
    SMART by Zabbix agent 2​
    https://git.zabbix.com/projects/ZBX/...r/smart_agent2

    SMART by Zabbix agent 2 active

    Leave a comment:


  • fl0w
    replied
    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..

    Leave a comment:


  • pva
    commented on 's reply
    It looks like this is bug: https://support.zabbix.com/browse/ZBX-21934 Like it!

  • solution
    replied
    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

    Leave a comment:


  • torlik
    replied
    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.

    Leave a comment:


  • torlik
    replied
    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?

    Leave a comment:


  • TheImmortal
    replied
    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.

    Leave a comment:


  • ktt
    replied
    Originally posted by Ch77
    I added SMART Template at the second Debian server and I received this
    Code:
    Cannot create item: item with the same key "smart.disk.get[{#PATH},"{#RAIDTYPE}"]" already exists.
    Cannot create item: item with the same key "smart.disk.get[{#PATH},"{#RAIDTYPE}"]" already exists.
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    Cannot accurately apply filter: no value received for macro "{#ATTRIBUTES}".
    However there is no items with key such "smart.*"​

    I'm having this same problem with version 5.2.7. On couple of Ubuntu 20.04 computers, SMART monitoring works well, but on one computer, I receive this error. All of them use the same 5.2.7 version of agent. They all are behind proxys.

    When I issue this on local (problematic) computer's shell, the response is as it should be.
    Code:
    zabbix_get -s localhost -p 10050 -k smart.disk.discovery
    [{"{#NAME}":"sda sat","{#DISKTYPE}":"HDD","{#MODEL}":"WDC WD2500BEVT-00A23T0","{#SN}":"WD-WX91A6043599"}]
    ​

    Leave a comment:


  • 2b2bff
    replied
    The discovery rule for Linux gets disks by name rather than id. But those names like /dev/sda can be changing depending on what order the OS detects them. IMHO it would be better to use /dev/disk/by-id because those don't change...

    Leave a comment:


  • gmseeley
    replied
    The smart plugin should allow the filtering/configuration of the "raid" types as Proxmox/Debian will spam the system logs with:

    Code:
    program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
    and is caused by the code invoking smartctl with "areca", "cciss" and "3ware" on systems where none of these raid devices are in use/exist.

    I also think the plugin should have configuration to allow for optional sudo invocation of smartctl if the user running zabbix has permissions without sudo. Why? Again, it spams the logs with:

    Code:
    pam_unix(sudo:session): session closed for user root

    Leave a comment:


  • 2b2bff
    replied
    And another observation: I have a SDD with one entry in the error log. Now it is forever marked as failing.
    I think the trigger should rather be, that the error count in the log has been increasing. So you can ignore the error for the time being and only care about new ones...

    Leave a comment:


  • 2b2bff
    replied
    Another input: The wear out of SSDs and NVMes is not recognized in all cases. Currently it is looked for "percentage used". But there are different representations for this depending on the disk used. Like:

    233 Media_Wearout_Indicator 0x0032 082 082 000 Old_age Always - 0

    or

    202 Percent_Lifetime_Remain 0x0030 098 098 001 Old_age Offline - 2

    So the template should be extended to cover them as well...

    Cheers.

    Leave a comment:


  • ga6QWsJ2dVEF
    replied
    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.

    Leave a comment:


  • ga6QWsJ2dVEF
    replied
    Originally posted by rob4ikomg
    Hello all

    A have host "Windows 10" :
    --- zabbix agent (Active). Version: "zabbix_agentd Win64 (service) (Zabbix) 6.2.3". Location "C:\monitoring\zabbix\zabbix_agent.conf".
    --- Smart tool "smartmontools". Version: "smartctl 7.3 2022-02-28 r5338 [x86_64-w64-mingw32-w10-21H2] (sf-7.3-1)". Location: "C:\Program Files\smartmontools\bin\smartctl.exe".

    Code:
    zabbix agent config:
    LogFile=c:\monitoring\zabbix\zabbix_agentd.log
    DebugLevel=3
    LogFileSize=1
    
    StartAgents=0
    
    ServerActive=178.151.*.*:*
    Hostname=home
    RefreshActiveChecks=61
    
    Timeout=30
    ​


    I added a host to the zabbix server, but I get an error:
    Click image for larger version

Name:	Screenshot_2.png
Views:	3278
Size:	33.9 KB
ID:	452755
    Click image for larger version

Name:	Screenshot_3.png
Views:	3185
Size:	50.0 KB
ID:	452756

    Code:
    zabbix_agent.log
    
    7364:20221016:074123.806 Starting Zabbix Agent [home]. Zabbix 6.2.3 (revision 98ee88fc19d).
    7364:20221016:074123.807 **** Enabled features ****
    7364:20221016:074123.807 IPv6 support: YES
    7364:20221016:074123.807 TLS support: YES
    7364:20221016:074123.808 **************************
    7364:20221016:074123.808 using configuration file: C:\monitoring\zabbix\zabbix_agent.conf
    7364:20221016:074124.251 agent #0 started [main process]
    14892:20221016:074124.252 agent #1 started [collector]
    16404:20221016:074124.252 agent #2 started [active checks #1]
    16404:20221016:074138.565 active check "smart.disk.discovery" is not supported: Unsupported item key.
    16404:20221016:074148.857 active check "smart.disk.discovery" is not supported: Unsupported item key.
    16404:20221016:074158.991 active check "smart.disk.discovery" is not supported: Unsupported item key.
    16404:20221016:074208.097 active check "smart.disk.discovery" is not supported: Unsupported item key.​

    what am I doing wrong?


    Switch from zabbix-agentd to zabbix-agent2 , and it should work. I ran into the same problem. Use Zabbix Agent 2

    Leave a comment:

Working...