Ad Widget

Collapse

Zabbix SMART Template Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bfisher1128
    Junior Member
    • Dec 2025
    • 3

    #1

    Zabbix SMART Template Question

    Hello - I am new to Zabbix and still trying to figure everything out on the fly (as most in my position do).

    I am monitoring some Windows workstations with Zabbix 7.4.5 I'm trying to use the SMART by Zabbix agent 2 active template to get data about the hard drives. I have smartmontools installed and everything is configured correctly. My problem is that I am not getting any SMART data because during discovery, smartctl is detecting the DVD drive which causes everything to fail. I have tried adding a macro to the host to exclude this using {$SMART.DISK.NAME.NOT_MATCHES} = ^/dev/csmi0,0$ with no luck. The DVD drive is still being detected as if my macro isn't even being parsed. Does anyone have some guidance? Thanks in advance for anything you can point me to.
  • PavelZ
    Senior Member
    • Dec 2024
    • 162

    #2
    If something doesn't work, write your own workaround.
    Here's an example (it solves a different problem) - https://github.com/pavlozt/somezabbi...martctlwrapper

    Comment

    • bfisher1128
      Junior Member
      • Dec 2025
      • 3

      #3
      Thanks for the response - unfortunately, that one is a little above my head at this stage. If I can't get it to work using the provided macros, I don't know where to even start with writing my own workaround.

      I wanted to try to find the actual command for SMART detection and modify that on the host... I was thinking I could modify the command to exclude the /dev/csmi0,0 device from the start. But I haven't been able to find that yet.

      Comment

      • PavelZ
        Senior Member
        • Dec 2024
        • 162

        #4
        I suggest enabling full debugging on Zabbix agent, disabling all other templates, and recording the specific commands the agent runs. After that, you can think about what script to write

        Comment

        • bfisher1128
          Junior Member
          • Dec 2025
          • 3

          #5
          Well, it took me a few days, but I eventually concluded that the SMART template by Zabbix has some bugs with how things are processed.

          So I ended up writing my own template for SMART checks. I guess I was better than I thought at scripting.

          Comment

          Working...