Analysis of Nagios monitoring routers and switch devices

Source: Internet
Author: User
Tags mrtg


Analysis of Nagios monitoring routers and switch devices 1. Function introduction Nagios can monitor the status of switches and routers with manageable IP addresses. Small vswitches and hubs without management functions cannot be monitored. The monitoring method is to obtain related status information through external ping feedback or through SNMP protocol. Information that can be obtained on network devices includes packet loss rate, Packet Round-trip average time SNMP status information bandwidth and transmission rate. there are two ways to monitor www.2cto.com. One is to use ping to obtain the response time and packet loss rate of data packets. The other is to use SNMP data of network devices, use check_snmp to obtain the port status and check_mrtgtraf to understand the bandwidth status. Before using check_snmp, you must install the snmp package in the system. If not, install the snmp system package first, and then re-compile nagios plugins3. configure the step to complete the first operation to create a new Monitoring Device Host and service object to restart Nagios 4. confirm the content in/usr/local/nagios/etc/objects/commands. whether the command check_snmp and check_local_mrtgtraf are included in cfg is defined in/usr/local/nagios/etc/objects/templates. whether the cfg contains generic-switch 5. configure Nagios www.2cto.com. edit/usr/local/nagios/etc/nagios. cfg will # export _file =/usr/local/nagios/etc/objects/switch. # Remove B. edit/usr/local/nagios/etc/object/swi Tch. cfg file: define host {use generic-switch; Inherit default values from a template host_name Gateway; The name we're giving to this switch alias Firewall; A longer name associated with the switch address 192.168.200.1; IP address of the switch hostgroups allhosts, switches; host groups this switch is associated with} monitoring packet loss rate and RTA response time define service {use generic-service; Inherit values From a template host_name Gateway; 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%; when the packet loss rate exceeds 20% ms, or the packet loss rate exceeds 60% ms, the start alarm normal_check_interval 5 is triggered. Normally, retry_check_interval 1 is monitored every five minutes; in case of exceptions, the service is monitored once every minute} the SNMP monitoring switch and the define service {use generic-service; Inherit values from a template host_name Gateway service_description Uptime check_command check_snmp are used! -C public-o sysUpTime.0} www.2cto.com
Use MRTG to monitor network traffic information define service {use generic-service; Inherit values from a templatehost_name Gatewayservice_description Port 1 Bandwidth Usagecheck_command check_local_mrtgtraf! /Var/lib/mrtg/192.168.200.1 _ 1.log! AVG! 000000,2000000! RMB, RMB! 10} Use check_local_mrtgtraf set in the command to obtain the locally saved mrtg traffic log information for monitoring. The obtained file is/var/lib/mrtg/192.168.200.1 _ 1. the data value obtained by log is the AVG value. The value ranges from 1 Mbit/s to 1 Mbit/s ~ 2 m, then the status is changed to warning, if more than 5 m, then the status is changed to critical after the configuration is complete, service nagios restart this article is from the fat shark Network

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.