New version of check_smart supports multiple disk check (-g, --global)

Written by - 0 comments

Published on - Listed in Hardware Linux Nagios Monitoring


In the past days I've been working together with Jerome Lauret on a new version of the check_smart monitoring plugin.

His changes introduce the -g/--global parameter which can be used to do SMART checks on multiple disks at the same time. The given value is handled as regular expression, so if you use "-g /dev/sd", check_smart will look for all disks found starting with /dev/sd* (/dev/sda, /dev/sdb, /dev/sdc, etc).

Example:

/usr/lib/nagios/plugins/check_smart.pl -g /dev/sd -i ata
OK: [/dev/sda] - Device is clean --- [/dev/sdb] - Device is clean|

This also works on certain hardware raids, as long as the interface (-i) is static:

/usr/local/libexec/nagios/plugins/check_smart.pl -g /dev/pass -i scsi
OK: [/dev/pass0] - Device is clean --- [/dev/pass1] - Device is clean --- [/dev/pass2] - Device is clean --- [/dev/pass3] - Device is clean |

Note that there are no performance data, when the -g is used. Depending on the amount of disks in a system the output would just be too long.

The original check (with -d) still works of course:

/usr/local/libexec/nagios/check_smart_g.pl -d /dev/pass4 -i scsi
OK:  no SMART errors detected.  | sent_blocks=2132703124 temperature=32;;68

Thanks a lot to Jerome for his great work and contribution!


Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.

RSS feed

Blog Tags:

  AWS   Android   Ansible   Apache   Apple   Atlassian   BSD   Backup   Bash   Bluecoat   CMS   Chef   Cloud   Coding   Consul   Containers   CouchDB   DB   DNS   Database   Databases   Docker   ELK   Elasticsearch   Filebeat   FreeBSD   Galera   Git   GlusterFS   Grafana   Graphics   HAProxy   HTML   Hacks   Hardware   Icinga   Icingaweb   Icingaweb2   Influx   Internet   Java   KVM   Kibana   Kodi   Kubernetes   LVM   LXC   Linux   Logstash   Mac   Macintosh   Mail   MariaDB   Minio   MongoDB   Monitoring   Multimedia   MySQL   NFS   Nagios   Network   Nginx   OSSEC   OTRS   Office   PGSQL   PHP   Perl   Personal   PostgreSQL   Postgres   PowerDNS   Proxmox   Proxy   Python   Rancher   Rant   Redis   Roundcube   SSL   Samba   Seafile   Security   Shell   SmartOS   Solaris   Surveillance   Systemd   TLS   Tomcat   Ubuntu   Unix   VMWare   VMware   Varnish   Virtualization   Windows   Wireless   Wordpress   Wyse   ZFS   Zoneminder   


Update cookies preferences