Hi All,
I thought I'd share my snippet for getting a simple DRBD monitoring solution up and running with LLD+Auto-Discovery Templates.
I wrote this to monitor some older Ubuntu 10.04 machines running DRBD 8. Mileage may vary depending on your OS and the scripts available
You'll need to get the following script:
and this is the template:
Also add the following to the servers being monitored (or append relevant files if they already exist):
User Parameters:
/etc/sudoers.d/zabbix
This should add an "App - DRBD" template that can be assigned to hosts. It has two item prototypes for cstate/dstate and triggers for each. It will iterate over the output of "/etc/init.d/drbd status" during discovery and add entries for each resource it finds.
It's not fool-proof, but it works for me. Happy to commit changes if anyone finds anything that could be fixed or made better.
Hope that helps someone out.
Cheers,
DD
I thought I'd share my snippet for getting a simple DRBD monitoring solution up and running with LLD+Auto-Discovery Templates.
I wrote this to monitor some older Ubuntu 10.04 machines running DRBD 8. Mileage may vary depending on your OS and the scripts available
You'll need to get the following script:
and this is the template:
Also add the following to the servers being monitored (or append relevant files if they already exist):
User Parameters:
Code:
UserParameter=drbd.resource.cstate[*],sudo /etc/zabbix/plugins/drbd_stats cstate $1 UserParameter=drbd.resource.dstate[*],sudo /etc/zabbix/plugins/drbd_stats dstate $1 UserParameter=drbd.resource.discovery,sudo /etc/zabbix/plugins/drbd_stats discovery
Code:
zabbix ALL=(ALL) NOPASSWD:/etc/zabbix/plugins/drbd_stats
It's not fool-proof, but it works for me. Happy to commit changes if anyone finds anything that could be fixed or made better.
Hope that helps someone out.
Cheers,
DD
Comment