资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

LinuxHAHeartbeat/MonitoringwithNagios

< Linux HA Heartbeat
Jump to: navigation, search

Contents

[hide]

Requirements

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

Script

The 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 Heartbeat
define 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 heartbeat
define service{
    use check-heartbeat
    host_name   lvs1, lvs2
}
Retrieved from "http://wiki.debuntu.org/wiki/Linux_HA_Heartbeat/Monitoring_with_Nagios"

文章名称:LinuxHAHeartbeat/MonitoringwithNagios
文章起源:http://cdkjz.cn/article/gsdsij.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220