Hoping someone can shed some light on this and maybe provide an easy solution to monitoring software raid configs.
Some Details
Zabbix server= 2.0.2
Zabbix Client = same
I am a long time user of zabbix since the pre 1.0 versions and in the past created scripts for many of my custom checks, recently I have started using puppet for server builds and have moved to using zabbix userparameters in the zabbix_agentd.conf for any custom checks because it was easy to build a zabbix module that auto created the zabbix_agentd.conf with a new server build and to use host exceptions in the erb template to create a host specific zabbix conf. (probably too much info but I am not looking for a workaround scripting solution for my problem).
I am trying to monitor software raid arrays and the proper way to do this without using the mdadm --monitor feature is to use the following line.
/sbin/mdadm --detail --brief --test /dev/md3 &>/dev/null;echo $?
#the resulting command status code if 0 is an "OK Array", all other numbers reflect a different issue with the array.
My problem is this command sends a 0 out at the command line but zabbix captures a 1. I would assume the command status code is reflecting something different.
Here is my line in zabbix_agentd.conf
UserParameter=it.raid1md3,/sbin/mdadm --detail --brief --test /dev/md3 &>/dev/null;echo "$?"
Here is the output of debug on the server when it runs this command.
Run remote command [/sbin/mdadm --detail --brief --test /dev/md3 &>/dev/null;echo $?] Result [1] [1]...
3338:20130110:174423.113 Sending back [1]
Hoping someone can point me in the right direction?
Many thanks for any help to be had.
Andre
Some Details
Zabbix server= 2.0.2
Zabbix Client = same
I am a long time user of zabbix since the pre 1.0 versions and in the past created scripts for many of my custom checks, recently I have started using puppet for server builds and have moved to using zabbix userparameters in the zabbix_agentd.conf for any custom checks because it was easy to build a zabbix module that auto created the zabbix_agentd.conf with a new server build and to use host exceptions in the erb template to create a host specific zabbix conf. (probably too much info but I am not looking for a workaround scripting solution for my problem).
I am trying to monitor software raid arrays and the proper way to do this without using the mdadm --monitor feature is to use the following line.
/sbin/mdadm --detail --brief --test /dev/md3 &>/dev/null;echo $?
#the resulting command status code if 0 is an "OK Array", all other numbers reflect a different issue with the array.
My problem is this command sends a 0 out at the command line but zabbix captures a 1. I would assume the command status code is reflecting something different.
Here is my line in zabbix_agentd.conf
UserParameter=it.raid1md3,/sbin/mdadm --detail --brief --test /dev/md3 &>/dev/null;echo "$?"
Here is the output of debug on the server when it runs this command.
Run remote command [/sbin/mdadm --detail --brief --test /dev/md3 &>/dev/null;echo $?] Result [1] [1]...
3338:20130110:174423.113 Sending back [1]
Hoping someone can point me in the right direction?
Many thanks for any help to be had.
Andre

Comment