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.
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
- op5
- op5 Monitor
- Nagios
- PortIQ appliance box from Infoblox
- Tech world
One Response to “Keep track of unused switch ports with Nagios or op5 Monitor”
Leave a Reply
You must be logged in to post a comment.
December 2nd, 2009 at 6:05 pm
[…] Keep track of unused switch ports with Nagios or op5 Monitor […]