你好,游客 登录 注册 搜索
背景:
阅读新闻

Nagios报警时间间隔的配置

[日期:2014-09-13] 来源:Linux社区  作者:Linux [字体:大 中 小]

Nagios报警时间间隔的配置

host_name:必须是主机配置文件hosts.cfg中定义的主机。

check_command:在commands.cfg文件中定义或在nrpe.cfg里面定义的命令;

max_check_attempts: 最大重试次数,一般设置为4次左右;

normal_check_interval 和retry_check_interval检查间隔的单位是分钟。

notification_interval  通知间隔指探测到故障后,每隔多长时间发送一次报警信息,单位是分钟。

notification_options:通知选项跟联系人配置文件相同。

contact_groups:配置文件contactgroup.cfg定义的组名称。

注意:check_command选项后面跟的命令一定要在commands.cfg里有定义;

例子:

vi  /usr/local/nagios/etc/services.cfg

#监控主机是否存活

define service{

        host_name              nagios-server

        service_description    check-host-alive

        check_command          check-host-alive

        max_check_attempts      5

        normal_check_interval  5

        retry_check_interval    2

        check_period            24x7

        notification_interval  10

        notification_period    24x7

        notification_options    w,u,c,r

        contact_groups          sagroup

        }

#监控主机的web服务

define service{

        host_name              nagios-server

        service_description    check_tcp 80

        check_period            24x7

        max_check_attempts      4

        normal_check_interval  3

        retry_check_interval    2

        contact_groups          sagroup

        notification_interval  10

        notification_period    24x7

        notification_options    w,u,c,r

        check_command          check_tcp!80

        }

#监控主机的cpu负载情况

define service{

        host_name              nagios-server

        service_description    cpu load

        check_command          check_nrpe!check_load

        check_period            24x7

        max_check_attempts      4

        normal_check_interval  3

        retry_check_interval    2

        contact_groups          sagroup

        notification_interval  10

        notification_period    24x7

        notification_options    w,u,c,r

        }

#监控主机的进程数

define service{

        host_name              nagios-server

        service_description    total-procs

        check_command          check_nrpe!check_total_procs

        check_period            24x7

        max_check_attempts      4

        normal_check_interval  3

        retry_check_interval    2

        contact_groups          sagroup

        notification_interval  10

        notification_period    24x7

        notification_options    w,u,c,r

        }

网络监控器Nagios全攻略 http://www.linuxidc.com/Linux/2013-07/87067.htm

Nagios搭建与配置详解 http://www.linuxidc.com/Linux/2013-05/84848.htm

Nginx环境下构建Nagios监控平台 http://www.linuxidc.com/Linux/2011-07/38112.htm

在RHEL5.3上配置基本的Nagios系统(使用Nagios-3.1.2) http://www.linuxidc.com/Linux/2011-07/38129.htm

CentOS 5.5+Nginx+Nagios监控端和被控端安装配置指南 http://www.linuxidc.com/Linux/2011-09/44018.htm

Ubuntu 13.10 Server 安装 Nagios Core 网络监控运用 http://www.linuxidc.com/Linux/2013-11/93047.htm

Nagios 的详细介绍:请点这里
Nagios 的下载地址:请点这里

本文永久更新链接地址:http://www.linuxidc.com/Linux/2014-09/106584.htm

linux
相关资讯       Nagios报警 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款