I am trying to setup SMART monitoring on some servers. I have setup the following smart.config file:
cache=/var/cache/smart
smartctl=/usr/bin/env smartctl
useSN=0
sdb
sdc
So, it’s not too complicated. However, the UI in LibreNMS just shows:
All Drives | drives: {“data”:{“dev_error”:0
Sure enough, If I just run ‘/etc/snmp/smart’, I get this output:
{“data”:{“dev_error”:0,“disks”:{“sdb”:{“10”:null,“12”:null,“173”:null,“177”:null,“183”:null,“184”:null,“187”:null,“188”:null,“190”:null,“194”:null,“196”:null,“197”:null,“198”:null,“199”:null,“231”:null,“232”:null,“233”:null,“5”:null,“9”:null,“dev_error”:0,“disk”:“sdb”,“exit”:32512,“health_pass”:0,“json_err”:1,“json_err_str”:“malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before “(end of string)”) at /etc/snmp/smart line 665.\n”,“max_temp”:null,“over_temp”:0,“selftest_log”:null,“serial”:null,“temp_limit”:null},“sdc”:{“10”:null,“12”:null,“173”:null,“177”:null,“183”:null,“184”:null,“187”:null,“188”:null,“190”:null,“194”:null,“196”:null,“197”:null,“198”:null,“199”:null,“231”:null,“232”:null,“233”:null,“5”:null,“9”:null,“dev_error”:0,“disk”:“sdc”,“exit”:32512,“health_pass”:0,“json_err”:1,“json_err_str”:“malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before “(end of string)”) at /etc/snmp/smart line 665.\n”,“max_temp”:null,“over_temp”:0,“selftest_log”:null,“serial”:null,“temp_limit”:null}},“exit_nonzero”:2,“unhealthy”:0,“useSN”:“0”},“error”:0,“errorString”:“”,“version”:1}
If I run ‘smartctl -a /dev/sdb’ manually, it seems to work just fine and gives me lots of data.
It seems like the smart script is having problems parsing the json from smartctl.
Anybody ever seen this? My system is running Almalinux 8.10. Smartctl is version 7.1.