monitoring routers, Cisco switches
Because the monitoring client cannot be installed on the switch or router, the SNMP plug-in is used
View
# vi/usr/local/nagios/libexec/There is no CHECK_SNMP plugin, no need to install.
First, install SNMP service
#yum install-y net-snmp net-snmp-devel net-snmp-perl net-snmp-utils MRTG
After installing SNMP to recompile the installation Nagios plugin nagios-plugins-2.0 will be
Generate CHECK_SNMP plugin under/usr/local/nagios/libexec/
Cisco switches:
System test:
The CHECK_SNMP command provides detailed instructions on how to view help information by entering CHECK_SNMP–HELP on the Linux command line, including the use of each parameter.
Here is an example of a system that detects Cisco switches, demonstrating how to use CHECK_SNMP. Switches for the Cisco 4500 series, System-described OID for. 1.3.6.1.2.1.1.1.0
[Email protected] libexec]#/check_snmp-h 10.241.10.1-o. 1.3.6.1.2.1.1.1.0-c Public
SNMP metric remains "Cisco IOS software, Catalyst 4500 L3 Switch Software (Cat4500-entserv | K9-M), Version 12.2 (SG2), RELEASE Software (FC1)
Recommended OIDs for Nagios monitoring:
System memory usage (within 5 minutes) 1.3.6.1.4.1.9.9.48.1.1.1.5.1
System available memory (within 5 minutes) 1.3.6.1.4.1.9.9.48.1.1.1.6.1
CPU utilization (within 5 minutes) 1.3.6.1.4.1.9.2.1.58.0
Hardware Status 1.3.6.1.4.1.9.9.13
Rosteros:
Enable SNMP in RouterOS:
[admin @ Mikrotik]/snmp> print enabled: No Contact: Location: Engine ID: Trap Community: (unknown) trap version: 1[admin @ M Ikrotik]/snmp> set enabled Yes
object Identifier (OID)
[admin @ mikrotik] / interface> print oid flag:d - Dynamic,x - Disable,r - run,s - slave 0 r name = . 1.3.6.1.2.1.2.2.1.2.1 mtu = .1.3.6.1.2.1.2.2.1.4.1 mac-address = .1.3.6.1.2.1.2.2.1.6.1 admin-status = .1.3.6.1.2.1.2.2.1.7.1 operation status = .1.3.6.1.2.1.2.2.1.8.1 bytes-in = . 1.3.6.1.2.1.2.2.1.10.1 packet-in = . 1.3.6.1.2.1.2.2.1.11.1 discards-in = .1.3.6.1.2.1.2.2.1.13.1 errors-in = .1.3.6.1.2.1.2.2.1.14.1 bytes-out = . 1.3.6.1.2.1.2.2.1.16.1 packets-out = . 1.3.6.1.2.1.2.2.1.17.1 discard-out = .1.3.6.1.2.1.2.2.1.19.1 Error Timeout = .1.3.6.1.2.1.2.2.1.20.1
Above is the OID is the interface traffic these
Below is the OID of CPU and men
Configuration file:
Define service{use Generic-service; Inherit values from a template host_name routeros-xxxxx service_description cpu che Ck_command check_snmp!-c public-o. 1.3.6.1.2.1.25.3.3.1.2.1-w 30-c 50}
Reprint reference:
Https://wiki.mikrotik.com/wiki/Manual:SNMP
Http://www.net130.com/CMS/Pub/Tech/tech_zh/2011_07_13_89499.htm
Centos 6.5 monitoring router, Cisco switch Nagios (three)