In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how Nagios monitors routers. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
I. configuration of the router
Here I use the GNS3 simulator to simulate the router, bridge to the physical network, and configure the relevant IP and enable SNMP related information
The router configuration is as follows:
Router#conf terminal
Router (config) # int e0Universe 0
Router (config-if) # ip address 192.168.30.130 255.255.255.0
Router (config-if) # no sh
Router (config-if) # exit
Router (config) # snmp-server community public RW
Router (config) # snmp-server location China-jcs-F/5F
Router (config) # snmp-server contact IT:Allan EXT:7758
Router (config) # snmp-server host 192.168.30.100 public snmp
Router (config-if) # end
Test connectivity to the nagios server
Router#ping 192.168.30.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.30.100, timeout is 2 seconds:
.!
Success rate is 80 percent (4amp 5), round-trip min/avg/max = 4-14-28 ms
II. Configuration of Nagios server
Because Nagios detects router-related conditions through the plug-in check_snmp. Because there is no net-snmp installed before, we need to install it first.
[root@server ~] # yum-y install net-snmp-libs net-snmp-devel net-snmp net-snmp-utils
Nagios-plugin needs to be recompiled after installation
[root@server nagios-plugins-1.4.14] #. / configure
[root@server nagios-plugins-1.4.14] # make
[root@server nagios-plugins-1.4.14] # make install
After compiling and installing, test snmp on the local machine
Add a host as shown in the figure. Here, check the connectivity of the router with the PING command.
You can customize a command according to your needs, command-define-add
For example, I want to check how long the router has been started, but the command we are going to execute is: check_snmp-H'$HOSTADDRESS-C'$ARG1-o sysUpTime.0
First check the value of OID of sysuptime through the command: sysUpTimeInstance
[root@server] # snmpwalk-v1-c public 192.168.30.130 sysUpTimeInstance
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (245944) 040 59.44
Then go to Supervision-Service-add to the inspection command here, we can choose the command we just customized.
Add one more service to check the status of router f0cano interface
When the configuration is complete, remember to write to the configuration
Then associate the service just built in the mainframe.
After checking the configuration for errors, restart nagios
Thank you for reading! This is the end of the article on "how Nagios monitors routers". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.