Hello fellow zabbixers!
I thought that it would be nice to get notified about raid disk failures by zabbix, so I've put together a small bash script to generate monitoring XML templates for LSI and Symbios MegaRAID controllers using the MegaCli executable downloadable from www.lsi.com.
You should run the script on the host to be monitored since it only generates template items and notification triggers for existing drives. You must set the path to the MegaCli executable in the header of the script, then run it like:
On success you should see something like:
xml
And of course the file 'megaraid_template.xml' would contain the template generated for your configuration.
Don't forget to add the following line to your zabbix_agentd.conf and restart your agent:
Where $CMD is the path to your copy of MegaCli executable. Also consider that the command above presumes that the user running your agent is permitted to use 'sudo' (eg.: the zabbix user is in the sudoers file).
Cheers:
Erno Rigo
I thought that it would be nice to get notified about raid disk failures by zabbix, so I've put together a small bash script to generate monitoring XML templates for LSI and Symbios MegaRAID controllers using the MegaCli executable downloadable from www.lsi.com.
You should run the script on the host to be monitored since it only generates template items and notification triggers for existing drives. You must set the path to the MegaCli executable in the header of the script, then run it like:
Code:
bash confgen_zabbix_megacli.sh > megaraid_template.xml
xml
Code:
+ detecting adapters + found 1 adapter(s) + examining adapter 0 + found disk: 32:0 + found disk: 32:1 + found disk: 32:2 + done
Don't forget to add the following line to your zabbix_agentd.conf and restart your agent:
Code:
UserParameter=megaraid[*],sudo $CMD -pdInfo -PhysDrv[$2:$3] -a$1 | grep '$4' | cut -f2 -d':' | cut -b2-
Cheers:
Erno Rigo
Comment