网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

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://bjjierui.cn/article/gsdsij.html

其他资讯