Ad Widget

Collapse

Cant unmarshal json S.M.A.R.T. Discovery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pieter-Visscher
    Junior Member
    • Jun 2023
    • 2

    #1

    Cant unmarshal json S.M.A.R.T. Discovery


    Hello,

    I am trying to apply the default Zabbix provided S.M.A.R.T. template to some of my hosts. However, I am getting the following error:
    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.
    I
    think this is because the json returned from "zabbix_agent2 -t smart.disk.discovery" starts with "[ s| [" but after some research I've noted that this is an expected result. I've checked the rest of the returned json and its able to parse as valid after removing s| from the beginning. Now I am at a total loss for what could be causing this error. Any suggestions?

    Thanks in Advance,

    Pieter

  • Pieter-Visscher
    Junior Member
    • Jun 2023
    • 2

    #2
    I have managed to resolve this issue, the issue was missing sudo rights for smartctl.

    Comment

    Working...