×

扫描二维码登录本站

QQ登录

只需一步,快速开始

Nagios的安装与配置(6)

标签: 暂无标签
本帖最后由 monicazhang 于 2015-10-30 21:38 编辑

20151030淡然
续上




  monday         00:00-12:00
        tuesday         00:00-12:00
        wednesday      00:00-12:00
        thursday        00:00-12:00
        friday          00:00-12:00
        saturday        00:00-12:00
        }
define timeperiod{
        timeperiod_name pm                           开源监控软件
        alias           pm
        sunday          12:00-24:00
        monday          12:00-24:00
        tuesday         12:00-24:00
        wednesday       12:00-24:00
        thursday        12:00-24:00
        friday          12:00-24:00
        saturday        12:00-24:00
        }
Ø         定义contact,内容如下                           nagios安装
define contact {
        contact_name    test1                                                                           //定义上午接收邮件报警用户
        alias                system administrator
        service_notification_period    am
        host_notification_period       am
        service_notification_options   w,u,c,r
        host_notification_options       d,u,r
        service_notification_commands  notify-service-by-email
        host_notification_commands     notify-host-by-email
        email                          test1@test.com                 nagios配置
        }
define contact {
        contact_name    test2                                                                           //定义下午接收短信报警用户
        alias           test2
        service_notification_period    pm
        host_notification_period       pm
        service_notification_options   w,u,c,r
        host_notification_options       d,u,r
        service_notification_commands  notify-service-by-fetion
        host_notification_commands     notify-host-by-fetion
        email                          test2@test.com
        }
Ø         定义contactgroups,内容如下
define contactgroup {
        contactgroup_name    network
        alias                network administrator group
        members              test1
}
define contactgroup {
        contactgroup_name    system
        alias                system administrator group                         监控软件
        members              test2
}
Ø         定义host,内容如下
define host {
        use                     host-pnp
        host_name               nagios-test1
        alias                   nagios test1
        address                 172.26.188.202
        contact_groups          network,system
        check_command           check-host-alive
        max_check_attempts      5
        notification_interval   60
        notification_period     24x7
        notification_options    d,u,r
        }
define host {
        use                     host-pnp
        host_name               GIS01
      alias                   GIS01
        address                 172.26.188.212
        contact_groups          network,system
        check_command           check-host-alive                        nagios实施
        max_check_attempts      5
        notification_interval   60
        notification_period     24x7
        notification_options    d,u,r
}
Ø         定义service,内容如下
define service {
        use                   srv-pnp
        host_name             nagios-test1
        service_description   check_tcp 80
        check_period          24x7
        max_check_attempts    4
        normal_check_interval 3
        retry_check_interval  2
        contact_groups        system,network
        notification_interval   60
        notification_period     24x7
        notification_options    w,u,c,r
        event_handler_enabled   1
        event_handler           restart-httpd                  nagios培训
        check_command      check_tcp!80
        }




本帖关键字:Nagios




上一篇:Nagios的安装与配置(5)
下一篇:Nagios完整的配置方案(1)
monicazhang

写了 2297 篇文章,拥有财富 12859,被 21 人关注

您需要登录后才可以回帖 登录 | 立即注册
B Color Link Quote Code Smilies

成为第一个吐槽的人

最新100贴|论坛版块|ITIL先锋论坛 |粤ICP备11099876号|网站地图
Powered by Discuz! X3.4 Licensed  © 2001-2017 Comsenz Inc.
返回顶部