Ad Widget

Collapse

SMART plugin connection problems

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • crispy caesus
    Junior Member
    • Jun 2024
    • 2

    #1

    SMART plugin connection problems

    I wanted to use SMART to check things like ssd lifetime, but I cannot seem to connect to it

    Whenever I try, I get this output

    Code:
    [crispy@bob code]$ zabbix_get -s 127.0.0.1 -p 10060 -k "system.cpu.load[all,avg1]"
    1.157715
    [crispy@bob code]$ zabbix_get -s 127.0.0.1 -p 10060 -k "smart.disk.get[nvme0n1]"
    ZBX_NOTSUPPORTED: Cannot unmarshal JSON.: invalid character 's' looking for beginning of value.
    I have added zabbix to the sudoers, aswell as created a simlink in /usr/local/bin for smartctl

    I'd help a lot to even know which log might help me, as I can't find anything in the journalctl of the agent

    here would be all my versions in case that's important (arch):
    Code:
    zabbix-agent 6.4.15-1
    zabbix-agent2 6.4.15-1
    zabbix-frontend-php 6.4.15-1
    zabbix-server 6.4.15-1​
  • Answer selected by crispy caesus at 24-07-2024, 14:47.
    viruslab
    Junior Member
    • Jul 2024
    • 4

    My bad
    I was reading the manual late at night.
    Today I add zabbix ALL=(ALL) NOPASSWD:/usr/sbin/smartctl with visudo tool and added the path variable Plugins.Smart.Path=/usr/sbin/smartctl
    restart zabbix agent and it WORKS!

    Comment

    • viruslab
      Junior Member
      • Jul 2024
      • 4

      #2
      I have the same problem!
      zabbix_agent2 -t smart.disk.discovery return wrong JSON
      smart.disk.discovery [s|[{"{#NAME}":"sda sat","{#DISKTYPE}":"ssd","{# zz0.jldsi7fs2wpzz
      It can't phase it.
      I don't know how to workaround this issue.

      Comment

      • viruslab
        Junior Member
        • Jul 2024
        • 4

        #3
        My bad
        I was reading the manual late at night.
        Today I add zabbix ALL=(ALL) NOPASSWD:/usr/sbin/smartctl with visudo tool and added the path variable Plugins.Smart.Path=/usr/sbin/smartctl
        restart zabbix agent and it WORKS!

        Comment

        • crispy caesus
          Junior Member
          • Jun 2024
          • 2

          #4
          ohh yes thank you, I forgot to add the plugin in the config of the agent somehow

          Comment

          Working...