Welcome to It-Slav.Net blog
Peter Andersson
peter@it-slav.net

I've already got a female to worry about. Her name is the Enterprise.
-- Kirk, "The Corbomite Maneuver", stardate 1514.0

Background

I was reading the Swedish computer magazine, Tech World. There was an article about an appliance solution that could give a report about unused switch ports. The box PortIQ from Infoblox costs approximatly 10.000 Euro.

op5 has developed this feature at a customer site and is included with op5 Monitor, op5 has published the code as opensource.

This guide will describe howto get it running in op5 Monitor. op5 Monitor is vanilla Nagios with some addons so it should be no problem to follow this guide in a Nagios environment

 

 

Installation

1. Update your op5 Monitor or download the plugin and report script.

 

2. Create metadata for check_portstatus as $USER1$/check_portstatus -H $HOSTADDRESS$

in checkcommands.cfg:

# command 'check_portstatus'
define command{
    command_name                   check_portstatus
    command_line                   $USER1$/check_portstatus -H $HOSTADDRESS$
    }

 

3. mkdir /var/spool/check_portstatus

 

4. chown monitor:apache /var/spool/check_portstatus

 

5. cp /opt/monitor/op5/portstatus/portstatus.php /var/www/html/portstatus.php

 

6. Define your service i.e. services.cfg:

# service 'Portstatus'
define service{
    use                            default-service
    host_name                      gw
    service_description            Portstatus
    check_command                  check_portstatus
    }

 

 

The result

The screenshot below shows a Cisco switch with alot of unused ports.

portstatus

 

 

Conclusions

This article shows how easy it is to modify Nagios and other opensource tools to give you what you want. Do not hesitate to contact me or op5 to help you enhance you Nagios or op5 installation.

 

Links

 


One Response to “Keep track of unused switch ports with Nagios or op5 Monitor”

  1. Links 02/12/2009: Fedora 13 Naming, Haystack 1.0 Released | Boycott Novell Says:

    […] Keep track of unused switch ports with Nagios or op5 Monitor […]

Leave a Reply

You must be logged in to post a comment.





Book reviews
FreePBX 2.5
Powerful Telephony Solutions






Asterisk 1.6
Build a feature rich telephony system with Asterisk






Learning NAGIOS 3.0





Cacti 0.8 Network Monitoring,
Monitor your network with ease!