Translate RAID utility output into prometheus metrics
Go to file
Neale Pickett 90428f010b Add a README 2019-08-27 14:59:12 +00:00
Dockerfile Add license 2018-05-30 10:09:50 -04:00
LICENSE Add license 2018-05-30 10:09:50 -04:00 Add a README 2019-08-27 14:59:12 +00:00 Fix storcli path 2018-05-18 14:03:16 -05:00 A few fixes for my environment: 2019-08-27 01:50:40 +00:00

What This Is

It's a script to pull RAID status from various RAID clients (storcli, megacli, perccli), and write them in Prometheus-compatible output somewhere.

You can make prometheus-node-exporter pull these in as textfiles, and then you have RAID stuff in prometheus. We use this to monitor drive failure, mostly.


On a Debian-based system (including Ubuntu):

sudo apt install prometheus-node-exporter moreutils
sudo sed -i "s#^ARGS='#ARGS=' #" /etc/defaults/prometheus-node-exporter
sudo systemctl restart prometheus-node-exporter
cd /usr/local/src && sudo git clone
cat <<EOD | sudo tee /etc/cron.d/prometheus-storcli > /dev/null
*/5 * * * * root python /usr/local/src/docker-storcli-prometheus/ --storcli_path=/opt/MegaRAID/perccli/perccli64 | sponge /var/lib/node-exporter/perccli.prom
*/5 * * * * root python /usr/local/src/docker-storcli-prometheus/ --storcli_path=/opt/MegaRAID/storcli/storcli64 | sponge /var/lib/node-exporter/storcli.prom
*/5 * * * * root python /usr/local/src/docker-storcli-prometheus/ --storcli_path=/opt/MegaRAID/megacli/megacli64 | sponge /var/lib/node-exporter/megacli.prom

This will run, every 5 minutes, something to probe every known (to me) RAID controller type, and output data to the node-exporter.

You will probably get errors if you just paste this in. At the very least you should delete the cron entries for binaries you don't have installed.