Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am setting up a test nagios box to learn a bit more about it at the request of my boss.

I installed Nagios 3.3.1 on an Ubuntu server 11.10 running in a VirtualBox. I also have connected to this virtual network a VBox running Server 2K8 with NSClient++ running on it. This I have set up and querying fine.

Also on this network I have a VBox running pFsense acting as a router between the internal virtual network and my host machine.

The directions I followed from the Nagios wiki on how to monitor routers and switches says to setup SNMP uptime check like so:

define service{

use         generic-service ; Inherit values from a template

host_name           linksys-srw224p

service_description Uptime  

check_command       check_snmp!-C public -o sysUpTime.0

}

I did this and the check would keep timing out and giving a critical warning on nagios.

I then changed the command to:

define service{

use         generic-service ; Inherit values from a template

host_name           linksys-srw224p

service_description Uptime  

check_command       check_snmp!-C public -o .1.3.6.1.2.1.1.3.0

}

And this works great, gives me the correct uptime of the pFsense box.

I am trying to figure out why I can't get the first one to work and why the second one does.

Can someone explain to me what the .1.3.6.1.2.1.1.3.0 corresponds to and how I can get the first command to work?

share|improve this question

2 Answers 2

The .1.3.6.1.2.1.1.3.0 is what is called an OID or Object Identifier. An OID functions as an address that identifies the location of a specific element within the entire SNMP network.

The reason the first command is not working is because your pFsense box does not recognize what the sysUpTime.0 command is.

You can read more about SNMP here

share|improve this answer

The fact that you're running 3.3.1 indicates that you compiled it yourself (probably following the "ubuntu quickstart"?).

This is a Bad Idea, for many reasons; 3.3.1 has Serious Bugs that make it unstable in some cases, the quickstart was written in ~2006 and is dangerously misleading, it's a lot more work, it prevents you from using any of the other Ubuntu-packaged nagios tools, etc.

You should abandon everything you've done, and install the 'nagios3' package from the Ubuntu repository. Once you've done that, read through "The Basics" sections of the docs (ignore the "Getting Started" crap).

You can then install the "nagios-snmp-plugins" package, which will get you some nice check_snmp variants.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.