Ad Widget

Collapse

Discussion thread for official Zabbix SMART Disk monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts

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

    Leave a comment:


  • Ch77
    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.*"​

    Problem was in zabbix agent version. I upgrade from 5.4 to 6.4 and problem was gone

    Leave a comment:


  • Ch77
    replied
    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.*"​


    Leave a comment:


  • doogie
    replied
    Originally posted by Ch77
    Can somebody explain to me what it means? I have a trigger error "SMART [sda]: Some command to the disk failed" and Exit status - 4 - "Bit 4: We found prefail Attributes <= threshold."
    I'm getting this error as well, but only on Debian servers for some reason. All the CentOS boxes seem to be working fine. They're all the same - Dell servers with Megaraid and all seems fine from smartctl side.

    Leave a comment:


  • Ch77
    replied
    Can somebody explain to me what it means? I have a trigger error "SMART [sda]: Some command to the disk failed" and Exit status - 4 - "Bit 4: We found prefail Attributes <= threshold."

    Leave a comment:


  • mhk
    replied
    I have a problem that seems to be purely related to Proxmox VE servers (version 6.4 and 7.x as reported by a user in a previous post).
    same here.
    the thing I found in regards to Proxmox - that I can't find a way to undo - is this:

    from the agent log:
    Code:
    2022/08/23 15:30:52.485456 executing direct exporter task for key 'smart.disk.discovery'
    2022/08/23 15:30:52.485476 [Smart] executing smartctl command: sudo -n smartctl --scan -j
    2022/08/23 15:30:52.485900 [Smart] command sudo -n smartctl --scan -j smartctl raw response: sh: 1: sudo: not found
    2022/08/23 15:30:52.485926 failed to execute direct exporter task for key 'smart.disk.discovery' error: 'Cannot fetch data: Failed to scan for devices: Cannot unmarshal JSON: invalid character 's' looking for beginning of value..'
    Notice the "sudo -n smartctl --scan [...]" and then the "sh: 1: sudo: not found"
    which from my assumption is what causes it, since Proxmox runs on Debian as root (no sudo pre-installed) but the plugin always want's to call the discovery with sudo and hence fails...

    any idea (apart from installing sudo, which I really don't want tbh) how to tell the thing to call it's function without sudo?

    at least that's what I found out so far, trying to solve this
    ZBX_NOTSUPPORTED: Cannot fetch data: Failed to scan for devices: Cannot unmarshal JSON: invalid character 's' looking for beginning of value..
    Last edited by mhk; 23-08-2022, 16:20.

    Leave a comment:


  • bcnx
    replied
    I have a problem that seems to be purely related to Proxmox VE servers (version 6.4 and 7.x as reported by a user in a previous post). The problem becomes apparent wit this command:

    Code:
    /usr/local/sbin/zabbix_agent2 -c /usr/local/etc/zabbix_agent2.conf -t smart.disk.discovery
    smart.disk.discovery [m|ZBX_NOTSUPPORTED] [Failed to execute smartctl: Command execution failed: exit status 127.]
    The Zabbix Agent 2 is running as root, so no permission problems. Using smartmontools 7.1.

    I did a ton of troubleshooting, but to no avail. Any input is appreciated.

    Cheers

    BC

    Leave a comment:


  • bcnx
    commented on 's reply
    You can use a parameter in the config file for the Zabbix Agent 2. You can point to the actual position of your smartctl binary. Less messy than a symlink.

  • bcnx
    commented on 's reply
    I have the exact same problem on Proxmox VE 6.4. It works fine on Ubuntu. No idea why, I'm using an alternative way of NMVe monitoring until I find a solution.

  • bcnx
    replied
    I think I know the problem: these commands output a very different output. It seems NVMe drives are less suitable to be monitored by SMART:

    # smartctl -a /dev/nvme0 -j
    # smartctl -a /dev/sda -j

    Not sure how to have NVMes output the same info. Maybe I need to monitor those by using nvme-cli (https://github.com/narbehaj/zabbix-nvme)

    Cheers,

    BC

    Leave a comment:

Working...