Cacti Netgear Switch Template

Posted on

Nagios is hands-down the best monitoring tool to monitor host and network equipments. Using Nagios plugins you can monitor pretty much monitor anything.

I use Nagios intensively and it gives me peace of mind knowing that I will get an alert on my phone, when there is a problem. More than that, if warning levels are setup properly, Nagios will proactively alert you before a problem becomes critical.

Earlier I wrote about, how to setup Nagios to monitor Linux Host, Windows Host and VPN device.

In this article, I’ll explain how to configure Nagios to monitor network switch and it’s active ports.

1. Enable switch.cfg in nagios.cfg

Uncomment the switch.cfg line in /usr/local/nagios/etc/nagios.cfg as shown below.

2. Add new hostgroup for switches in switch.cfg

Add the following switches hostgroup to the /usr/local/nagios/etc/objects/switch.cfg file.

3. Add a new host for the switch to be monitered

Mar 12, 2010 - I am looking for a template that we use to pull values of OID for Netgear GS748TS switch in CACTI. My remote help is gone for the night now. Mar 08, 2007  Is there any Netgear specific host or graphing script(s) that would resolve the issue below? I don't want any of the developers or gurus wasting their time if someone has already developed a script to take care of this.

In this example, I’ve defined a host to monitor the core switch in the /usr/local/nagios/etc/objects/switch.cfg file. Change the address directive to your switch ip-address accordingly.

4. Add common services for all switches

24 Port Netgear Switch

Displaying the uptime of the switch and verifying whether switch is alive are common services for all switches. So, define these services under the switches hostgroup_name as shown below.

5. Add service to monitor port bandwidth usage

check_local_mrtgtraf uses the Multil Router Traffic Grapher – MRTG. So, you need to install MRTG for this to work properly. The *.log file mentioned below should point to the MRTG log file on your system.

6. Add service to monitor an active switch port

Use check_snmp to monitor the specific port as shown below. The following two services monitors port#1 and port#5. To add additional ports, change the value ifOperStatus.n accordingly. i.e n defines the port#.

7. Add services to monitor multiple switch ports together

Sometimes you may need to monitor the status of multiple ports combined together. i.e Nagios should send you an alert, even if one of the port is down. In this case, define the following service to monitor multiple ports.

8. Validate configuration and restart nagios

Cacti

Verify the nagios configuration to make sure there are no warnings and errors.

Restart the nagios server to start monitoring the VPN device.

Verify the status of the switch from the Nagios web UI: http://{nagios-server}/nagios as shown below:

Cacti Netgear Switch Template

Fig: Nagios GUI displaying status of a Network Switch

9. Troubleshooting

Uk passport renewal overseas. Issue1: Nagios GUI displays “check_mrtgtraf: Unable to open MRTG log file” error message for the Port bandwidth usage

Netgear Switch Manual

Solution1: make sure the *.log file defined in the check_local_mrtgtraf service is pointing to the correct location.

Issue2: Nagios UI displays “Return code of 127 is out of bounds – plugin may be missing” error message for Port Link Status.

Solution2: Make sure both net-snmp and net-snmp-util packages are installed. In my case, I was missing the net-snmp-utils package and installing it resolved this issue as shown below.

Note: After you’ve installed net-snmp and net-snmp-utils, re-compile and re-install nagios plugins as explained in “6. Compile and install nagios plugins” in the Nagios 3.0 jumpstart guide.

Two Best Nagios Books

These are the two best nagios books that covers the latest Nagios 3. I strongly recommend that you read both of these books to gain a detailed understanding on Nagios. Since Nagios is free software, spending few dollars on the books can be the best investment you can make.

Nagios Book 1
Nagios Book 2

Awesome Nagios Articles

Following are few awesome Nagios articles that you might find helpful.

> Add your comment

If you enjoyed this article, you might also like.