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

定制建站费用3500元

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

成都品牌网站建设

品牌网站建设费用6000元

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

成都商城网站建设

商城网站建设费用8000元

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

成都微信网站建设

手机微信网站建站3000元

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

建站知识

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

Monitortheswitch

-------------------------------Switch-------------------------------

在融安等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供成都网站设计、做网站 网站设计制作定制开发,公司网站建设,企业网站建设,成都品牌网站建设,全网营销推广,外贸营销网站建设,融安网站建设费用合理。

Switch>en
Switch#conf t
Switch(config)#snmp-server community first-switch ro

Switch(config)#snmp-server enable traps

-------------------------------Monitoring Server-------------------------------

Install snmp:
#rpm -ivh lm_sensors-2.10.7-9.el5.x86_64.rpm
#rpm -ihv net-snmp-5.3.2.2-17.el5.x86_64.rpm

#rpm -ivh net-snmp-utils-5.3.2.2-17.el5.x86_64.rpm

Re-compile and install nagios-plugins:
#tar -xzf nagios-plugins-1.4.16.tar.gz
#cd nagios-plugins-1.4.16
#./configure --sysconfdir=/etc/nagios \
--with-nagios-user=nagios \
--with-nagios-group=nagios \
--prefix=/usr/local/nagios
#make

#make install

Definition monitor file:
#vi /etc/nagios/objects/switch.cfg
#Add by Kingcraft

define host{

        use             generic-switch,host-pnp         ; Inherit default values from a template

        host_name       linksys-srw224p                 ; The name we're giving to this switch

        alias           Linksys SRW224P Switch         ; A longer name associated with the switch

        address         192.168.60.16                  ; IP address of the switch

        }




define service{

        use                     generic-service,srv-pnp   ; Inherit values from a template

        host_name               linksys-srw224p            ; The name of the host the service is associated with

        service_description     PING                      ; The service description

        check_command           check_ping!200.0,20%!600.0,60%      ; The command used to monitor the service

        normal_check_interval   5                         ; Check the service every 5 minutes under normal conditions

        retry_check_interval    1                         ; Re-check the service every minute until its final/hard state is determined

        }




define service{

        use                     generic-service,srv-pnp   ; Inherit values from a template

        host_name               linksys-srw224p

        service_description     Uptime

        check_command           check_snmp!-C first-switch -o sysUpTime.0

        }




define service{

        use                     generic-service,srv-pnp  ; Inherit values from a template

        host_name               linksys-srw224p

        service_description     Port 1 Link Status

        check_command           check_snmp!-C first-switch -o ifOperStatus.10001 -r 1

        }




define service{

        use                     generic-service,srv-pnp

        host_name               linksys-srw224p

        service_description     Port 24 Link Status

        check_command           check_snmp!-C first-switch -o ifOperStatus.10024 -r 1

        }




define service{

        use                     generic-service,srv-pnp

        host_name               linksys-srw224p

        service_description     ciscoMemoryPoolFree

        check_command           check_snmp!-C first-switch -o .1.3.6.1.4.1.9.9.48.1.1.1.6.16     ; The size of the free memory

        }




define service{

        use                     generic-service,srv-pnp

        host_name               linksys-srw224p

        service_description     ciscoCPUTotal1min

        check_command           check_snmp!-C first-switch -o .1.3.6.1.4.1.9.9.109.1.1.1.1.4.1   ; The overall CPU busy percentage in the last 1 minute period

        }




define service{

        use                     generic-service,srv-pnp

        host_name               linksys-srw224p

        service_description     flow

        check_command           check_snmp!-C first-switch -o ifInOctets.10024 -w 5000000000-6000000000 -c 6000000000-8000000000    ; The total number of octets received on the interface,including framing characters

        }

Empowering for monitoring files:

#chown nagios:nagios /etc/nagios/objects/switch.cfg

Modify the nagios configuration file:
#vi /etc/nagios/nagios.cfg
#Add by Kingcraft

cfg_file=/etc/nagios/objects/switch.cfg

Syntax checking:

#/usr/local/nagios/bin/nagios -v /etc/nagios/nagios.cfg

restart httpd&nagios:
#service httpd restart

#service nagios restart


网站栏目:Monitortheswitch
文章来源:http://bjjierui.cn/article/poppdp.html

其他资讯