Nagios core – SNMP – monitor ethernet adapter bandwidth – part 2

Now that SNMP is setup on our Windows and Linux boxes we need to configure Nagios Core to monitor them.

Plugin details – Nagios Exchange

Plugin download – link

On nagios server go to /usr/local/nagios/libexec and download the plugin:

wget http://nagios.manubulon.com/check_snmp_int.pl

then make it executable

chmod +x check_snmp_int.pl

I assume you already have hosts configured so I will skip this step

Define nagios command:

define command{
command_name check_snmp_int
command_line $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ -C community_string -n $ARG1$ $ARG2$
}

Define service:

define service{
use generic-service
host_name YOUR_HOST
service_description eth0
check_command check_snmp_int!VMXNET3!-g -2 -B -M -k -f -w 4,5 -c 10,15
}

NOTES regarding defining service:
1. you have to find out what network adapter you have on your system – the above is for VMXNET3
this is how you do this:

root@nagios:/usr/local/nagios/var# /usr/local/nagios/libexec/check_snmp_int.pl  -H IP_Address -C Community_String -n -v
Alarm at 15 + 5
SNMP v1 login
Filter :
OID : 1.3.6.1.2.1.2.2.1.2.1, Desc : lo
Name : lo, Index : 1
OID : 1.3.6.1.2.1.2.2.1.2.2, Desc : VMware VMXNET3 Ethernet Controller
Name : VMware VMXNET3 Ethernet Controller, Index : 2
lo:UP, VMware VMXNET3 Ethernet Controller:UP:2 UP: OK

in this case the adapter I want is the VMware VMXNET3
2. VMXNET3 is a 64 bit adapter so flags -g -2 are required

Leave a Reply

Your email address will not be published. Required fields are marked *

two × four =

This site uses Akismet to reduce spam. Learn how your comment data is processed.