Linux HA Heartbeat/Monitoring with Nagios
1Requirements
2Linux HA Server
2.1Script
2.2Configuration
3Nagios Server
3.1template.cfg
3.2host file
You need to have a Nagios NRPE server running on the host.
The host need to have the command /usr/bin/cl_status accessible to user nrpe.
Linux HA Server ScriptThe script will return a Nagios code of:
OK: when the number of registered nodes and active nodes is equal
WARNING: If at least one node is active
CRITICAL: If the cluster status could not be accessed or if no nodes are active
You can get it here: media:check_heartbeat.sh
Copy it to your nagios plugins directory, in my case: /usr/local/nagios/libexec/
# cp check_hearbeat.sh /usr/local/nagios/libexec/check_heartbeat.sh# chmod 755 /usr/local/nagios/libexec/check_heartbeat.sh Configuration
Add the following to /etc/nagios/nrpe_local.cfg
command[check_heartbeat]=/usr/local/nagios/libexec/check_heartbeat.sh
and reload nrpe server:
# /etc/init.d/nagios-nrpe-server reload Nagios Server template.cfg
Add the following template:
# check LVS Heartbeatdefine service{ use generic-service name check-heartbeat service_description Linux HA LVS check_command check_nrpe!check_heartbeat} host file
Add the following service definition:
#check heartbeatdefine service{ use check-heartbeat host_name lvs1, lvs2}Retrieved from "http://wiki.debuntu.org/wiki/Linux_HA_Heartbeat/Monitoring_with_Nagios"Categories: Monitoring | Network | Nagios | Heartbeat
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。