快上网专注成都网站设计 成都网站制作 成都网站建设
成都网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

CustomTime

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

创新互联公司主要从事网站设计制作、成都网站建设、网页设计、企业做网站、公司建网站等业务。立足成都服务华容,十年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:18980820575

# '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


网站栏目:CustomTime
当前URL:http://6mz.cn/article/pcohhe.html

其他资讯