How does Nagios XI poll network devices via SNMP

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
atlantic
Posts: 45
Joined: Wed Feb 02, 2011 10:38 am

How does Nagios XI poll network devices via SNMP

Post by atlantic »

Topic: How does Nagios XI poll network devices (i.e. switches/routers) via SNMP?

We use the Network Switch/Router Configuration Monitoring Wizard to add switches and routers (mostly Cisco) to Nagios XI. We choose the "Port Description" option when defining the switch/router.

We wanted to understand the mechanism/method/process that Nagios XI uses to poll network devices via SNMP.

Thanks for indulging us. I hope I posed the question properly.

Regards,

Mark Frew
Atlantic Broadband
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA

Re: How does Nagios XI poll network devices via SNMP

Post by tonyyarusso »

Oh boy :P
  • The switch wizard is a PHP script that walks through collecting your preferences, the target IP address, etc.
  • These are handed off to a command-line utility called 'cfgmaker' (part of MRTG), which queries the target for a list of valid ports and some basic properties about them, and then spits out a configuration file for MRTG, as well as returning them to the PHP which creates Nagios services for each of them. Choosing the "Port Description" option dictates which field returned by cfgmaker to use as the service name in Nagios.
  • MRTG (Multi Router Traffic grapher) runs as a cron job every five minutes, checking each of those ports for the ifInOctets and ifOutOctets SNMP values. These are integer continuous counters of packet flow since the device was last rebooted (so, always increasing, until the counter overflows and resets to zero).
  • The return of that check is written to an RRD (Round Robin Database) file in /var/lib/mrtg, which is a type of single-file binary database (kind of similar to SQLite).
  • Nagios runs a check plugin for each service, which queries the RRD file with rrdtool, extracting the change in the value over the last check period (aka the mathematical derivative, or slope, of the values). The number represents the current bandwidth utilization. That check result is returned to Nagios.
  • Nagios displays the check result, and since it also includes valid "performance data" in the output, processes that perfdata to create another RRD file (this time in /usr/local/nagios/share/perfdata and with the bandwidth values rather than the counter ones).
  • The latter RRD file is used by PNP to generate the Performance graphs displayed in the XI interface.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/