Kyle Spencer edited this page Jan 22, 2018 · 7 revisions

DEPRECATED AND REMOVED IN v4.7 - SEE http://docs.ixpmanager.org/features/nagios/ FOR THE REPLACEMENT

IXP Manager can integrate with an existing Nagios installation to:

  • monitoring your switching infrastructure;
  • monitor your members' v4 and v6 reachability;
  • monitor your members' route collector sessions.

NB: IXP Manager will not install and configure Nagios from scratch. You need a working Nagios installation first and then IXP Manager will automate the above areas of the configuration.

The configuration is template based and skinable. Sample configs can be found in:

  • $IXPROOT/application/views/nagios-cli/conf

As a starting point, you should create your own skins directory and copy over the sample configurations.

Sample Script to Configure Nagios

At INEX, we use a script such as the following to reconfigure Nagios on a regular basis:

#! /usr/local/bin/bash

IXPTOOL=/path/to/IXP-Manager.git/bin/ixptool.php

$IXPTOOL -a nagios-cli.gen-switch-config >/usr/local/etc/nagios/inex/switches.cfg.$$
if [[ $? ]]; then
    mv /usr/local/etc/nagios/inex/switches.cfg.$$ /usr/local/etc/nagios/inex/switches.cfg
fi

$IXPTOOL -a nagios-cli.gen-member-config >/usr/local/etc/nagios/inex/members.cfg.$$
if [[ $? ]]; then
    mv /usr/local/etc/nagios/inex/members.cfg.$$ /usr/local/etc/nagios/inex/members.cfg
fi

/usr/local/etc/rc.d/nagios configtest >/dev/null
if [[ $? ]]; then
    /usr/local/etc/rc.d/nagios reload > /dev/null
fi

Monitoring Infrastructure Switches

The command $IXPTOOL -a nagios-cli.gen-switch-config above will generate a Nagios switch configuration with:

  • a ixp-production-switch host template and a ixp-production-switch-service service template (see: $IXPROOT/application/views/nagios-cli/conf/switch-definitions.phtml);
  • a host entry for each active switch based on the details in the switch database (see: $IXPROOT/application/views/nagios-cli/conf/switch-hosts.phtml);
  • each switch is placed in three hostgroups (see: $IXPROOT/application/views/_skins/inex/nagios-cli/conf/switch-templates.phtml):
    • a per location / data centre group: IXP-Switches-{$locationname}
    • a all production switches hostgroup: IXP-Production-Switches
    • a per-switch vendor hostgroup: IXP-Switches-{$vendor_shortname}
  • a standard ping check service is also created (see: $IXPROOT/application/views/_skins/inex/nagios-cli/conf/switch-templates.phtml).

The different hostgroups allow you to configure service changes based on location and vendor. E.g. each vendor would typically have a custom chassis check.

At INEX, we have a Extreme peering LAN and a Brocade peering LAN. As such, we have hostgroups called IXP-Switches-Brocade and IXP-Switches-Extreme.

Just running the above command will get all the switches monitoring for ping responses only but we want to monitor a lot more than that. We add in some additional service checks. The first is a standard chassis check that covers items such as both PSUs are installed and powered, CPU / load levels, memory availability, fans, temperature, etc. Here's a sample Nagios message from a functioning Extreme switch:

OK - CPU: 5sec - 10%. Uptime: 62.8 days. PSUs: 1 - presentOK: 2 - presentOK:. Overall system power state: redundant power available. Fans: [101 - OK (4311 RPM)]: [102 - OK (9273 RPM)]: [103 - OK (4468 RPM)]: [104 - OK (9637 RPM)]: [105 - OK (4165 RPM)]: [106 - OK (9273 RPM)]:. Temp: 34'C. Memory (slot:usage%): 1:29%.

All Extreme switches have a chassis check based on the following service definition:

define service{
        use                             ixp-production-switch-service
        hostgroup_name                  IXP-Switches-Extreme
        service_description             Chassis
        check_command                   check_extreme_chassis!snmp_community
}

with a service command definition:

define command{
        command_name    check_extreme_chassis
        command_line    /usr/local/nagios-plugins/check_chassis_extreme.php -c $ARG1$ -h $HOSTADDRESS$
}

We have separately released chassis check scripts for Brocade (php|perl), Cisco, Extreme and Linux/BSD servers.

We additionally check for SSH access, v6 when configured.

Monitoring Members

We monitor all member router interfaces (unless asked not to) via ICMP[v6] pings with Nagios. This is all controlled by $IXPROOT/application/views/nagios-cli/conf/members.cfg. We also monitor the mandatory route collector BGP sessions (you obviously need a route collector that supports this via SNMP).

To enable / disable these checks, edit the VLAN interface configuration and set IPvX Can Ping / IPvX Monitor RC BGP appropriately.

Members are added to a number of hostgroups just like switches above. Namely:

  • a per-switch hostgroup;
  • a per cabinet hostgroup;
  • a per location / data centre hostgroup;
  • a per protocol hostgroup;
  • a all members hostgroup; and
  • a member hostgroup (for members with multiple connections).

These hostgroups are very useful to single out issues and for post-maintenance checks.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.