Simple Host Monitor

Monitoring Firewalls and VPNs

I wrote this because I needed a simple way to monitor the status of my 50 sets of redundant Cisco PIX firewalls and various VPN gateways. I also needed an easy way to show our HelpDesk what firewalls were up/down, where they were located and their primary function. I later added in support to check up/down status of our VPN gateways and whether or not it was listening for IPSec connections.

There are many tools out there that could do this such as HP Openview,NagiosWhat’s Up Gold, etc. But none of them gave me exactly what I wanted or were as simple.

So for lack of a better name, I’ve called it Simple Host Monitor. At least for now. I am using it to monitor Firewalls and VPNs, but it could technically be used to monitor any host. It is simply doing a PING test to see if the host is alive. In the case of checking for IKE connections on a VPN device, I am just using NMAP to see if UDP port 500 responds.

The tool is very straight forward and I think there are ample comments to let you know how to configure it. The main script can be viewed or downloaded here. Simply rename the script by replacing the .txt with .pl. A Cron job will need to be set up for this script to run. I have my script running every four minutes. The script relies on two configuration files, the Main Configuration file and the Host Information file. If neither of these files exist, the main script will ask you if it can create the files for you. The configuration files will then need to be edited.

An example of the output can be seen here. All of the data that is displayed is customizable. You can change the colors and what information is displayed.

I am by no means a Perl master, so if anyone has any suggestions for me to improve the script, by all means, please let me know. If anyone has any suggestions on more things this script should do, let me know. I would love to make this script faster and more functional. You can email me at {sawall -[at]- gmail -[dot]- com}.

Last updated 7/23/05.