HDD Smart monitoring

I enabled Smart under Applications for my FreeBSD 11.1 server but the graphs are not populating
LibreNMS version - 1.35,1
I’d really like to know my hard drives temperatures or if they are going bad or not. The server is using snmp v3

Did you follow these steps? https://docs.librenms.org/#Extensions/Applications/#smart

Thank you Kevin, I need to try this!

  1. Downloaded https://github.com/librenms/librenms-agent/raw/master/snmp/smar and moved over /etc/snmp/smart
  2. Added extend smart /etc/snmp/smart to /etc/snmpd.config, I only have 2 HDD’s
  3. Created
    /etc/snmp/smart.config
    cache=/var/cache/smart
    #smartctl=/usr/bin/env smartctl
    smartctl=/usr/local/sbin/smartctl
    ada0
    ada1
  4. Restarted snmpd

After ~15 minutes still error drawing graphs. Maybe I’m just getting to sleepy :slight_smile:

I checked it a couple more times, it seems to be good, I’m still getting

Error Drawing Graphs

**./poller.php -h localhost -d -m applications returned this

SMARTSNMP[/usr/local/bin/snmpbulkwalk -v3 -n ‘’ -l ‘authPriv’ -a ‘MD5’ -A ‘xxxxx’ -u ‘user’ -x ‘AES’ -X ‘xxxxx’ -O qv -M /usr/local/www/librenms/mibs udp:HOSTNAME:161 .1.3.6.1.4.1.8072.1.3.2.3.1.2.5.115.109.97.114.116]
No Such Object available on this agent at this OID

RRD[update /usr/local/www/librenms/rrd/localhost/app-smart-11-.rrd N:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U]
SQL[UPDATE applications set app_state =‘UNKNOWN’,app_status =’’,timestamp =NOW() WHERE app_id = ‘11’]
SQL[SELECT * FROM application_metrics WHERE app_id=‘11’]

I can confirm, the hard drives showed up, but all graphs are empty

I had the same problem and finally figured it out. In short: delete the file /var/cache/smart and just wait, the graph will work from the next poll on.

Explanation: if you run /etc/snmp/smart with the option -g to guess at the config file, it touches /var/cache/smart to test privileges, but then also leaves the file there. Next time when it’s time to report SMART data, it sees that the cache file is there, so it prints its contents, but the file is empty so there is no data to graph!

This caching mechanism makes sense if the polling period is too frequent and there are many disks. In that case you can set a cron job on the host that updates the cache file more rarely, and snmpd only returns this (possibly somewhat old) cached information.

Thank you!
I just removed it, let’s see

Graphs are still empty :frowning:

Similar issue here … and I did a capture, seeing all NULL => I see the same thing running smart (script) as non-root (i.e. non-sudo), but fine when running as sudo.

Is LibreNMS perhaps not running as a user that can collect the data?

Thanks!

Has anyone had any luck getting this working?

Thanks!

Not luck yet

I’ve been having the same difficulty with this Smart App, but seem to have resolved it.
Assuming that you have configured this app properly and that the graphs are visible for the drives specified but show only nan for the values, I did the following.

  1. I changed the permissions on the smart cache file so that any one can write to it. (may not be the sole cause of it working)
  2. Executed the smart script with: ./smart -u Examine the cached smart file which should be updated and populated with the drive info. Wait and Librenms should update the graphs.

The graphs will still have nan values since the Smart app retrieves only a set of constant ID# that your drive may not have. You can compare these ID# by looking into the smart script and compare what you receive by executing smartctl in a terminal for the system.

PS. Also create a crontab as shown in the smart script.