温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Custom Time

发布时间:2020-07-28 02:41:28 来源:网络 阅读:324 作者:卍伪装卍 栏目:移动开发

Modify the time file:
# vi /etc/nagios/objects/timeperiods.cfg

# 'workhours' timeperiod definition
define timeperiod{
    timeperiod_name    workhours
    alias              Normal Work Hours
    monday             08:30-15:30,20:30-24:00
    tuesday            00:00-03:00,08:30-15:30,20:30-24:00
    wednesday          00:00-03:00,08:30-15:30,20:30-24:00
    thursday           00:00-03:00,08:30-15:30,20:30-24:00
    friday             00:00-03:00,08:30-15:30,20:30-24:00
    }


Modify the template file:
# vi /etc/nagios/objects/templates.cfg

define service{
    name                          generic-Flows
    active_checks_enabled         1
    passive_checks_enabled        1
    parallelize_check             1
    obsess_over_service           1
    check_freshness               0
    notifications_enabled         1
    event_handler_enabled         1
    flap_detection_enabled        1
    failure_prediction_enabled    1
    process_perf_data             1
    retain_status_information     1
    retain_nonstatus_information  1
    is_volatile                   0
    check_period                  workhours
    max_check_attempts            3
    normal_check_interval         3
    retry_check_interval          2
    contact_groups                Network
    notification_options          w,u,c,r
    notification_interval         60
    notification_period           workhours
    register                      0
    }


Modify the hosts file to be monitored:
# vi /etc/nagios/Juniper/CTFirewall.cfg

define service{
    use                   srv-pnp,generic-Flows
    host_name             CTFirewall
    service_description   ethernet0/0-Flow
    check_command         check_snmp!-C Firewall -P 2c -o ifInOctets.1
    }


Grammar Checker&&Restart:
# /usr/local/nagios/bin/nagios -v /etc/nagios/nagios.cfg
# service nagios restart







向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI