scripts/mfi_status
authorTomas Zeman <tzeman@volny.cz>
Mon, 07 Apr 2014 14:54:26 +0200
changeset 32 e119fde089b8
parent 31 50abf2d64158
child 33 338ee0353bf1
scripts/mfi_status
scripts/mfi_status
scripts/mfi_status.crontab
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/mfi_status	Mon Apr 07 14:54:26 2014 +0200
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+mfiutil show volumes | grep mfid | tr -d '()'|awk '{print "- mfi.status." $1 " " $5}'
+mfiutil show drives | tail -n +2 | tr -d '()' | sed -e 's/HOT /HOT_/' -e 's/UNCONFIGURED /UNCONFIGURED_/' | awk '{print $3}'|sort | uniq -c | awk '{print "- mfi.drives." $2 " " $1}'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/mfi_status.crontab	Mon Apr 07 14:54:26 2014 +0200
@@ -0,0 +1,2 @@
+*/5 * * * *     path/to/zabbix-scripts/mfi_status | zabbix_sender -s `uname -n` -z zabbix.server.example.org -i - > /dev/null 2>&1
+