Skip to content

Monitor disk SMART on anepsion

Nicolás Alvarez requested to merge work/telegraf-smart into master

Make telegraf get the SMART attributes of both disks on anepsion and send them to the monitoring server, where we can set alerts or graph stats over time. One of anepsion's disks seems to be having problems, so we need to watch it more closely.

Telegraf runs under a dedicated 'telegraf' user, and smartctl has to be run as root, so I'm also editing sudoers to let the telegraf user run sudo, only for the smartctl command. It also avoids logging those sudo calls in the syslog, since it would be very noisy when it runs every minute. This configuration is recommended in the 'smart' telegraf plugin documentation.

I'm putting this up for review especially due to the sudoers change. One thing I wonder is if I should put it in a new file inside /etc/sudoers.d/ rather than modifying sudoers itself.

Merge request reports