SNMP and Nagios

Well that would require that I write my own plugin and place it in the /usr/local/nagios/libexec directory? I have not written any of my own plugins as of yet. Basically, it would be an snmpget command that is used to poll data from the cisco router correct?

Are you thinking that this has something to do with a permissions setting somewhere? Is that what you want me to configure sudo for?

no no, just leave your current check_snmp command and the file just like it is.
Just simply make an addition to your checkcommands.cfg like I did for the check_smb_shares command. It’s the same ol command, but it ran as root, by using sudo. You do know what sudo is?

ok I think I know what you mean. So my new checkcommand should be something like this:

define command{
command_name check_snmp2
command_line sudo /usr/local/nagios/libexec/check_snmp -H $HOSTADDRESS$ -S $ARG1$ -U $USER3$ -P $USER4$-A $ARG2$ -w $ARG3$ -c $ARG4$

Yes sudo is for issuing a command as another user. But i’ve never set it up but that shouldn’t be too hard.

Is that check command that I have in this post what I should put into my configuration?

OK. The problem has been fixed. In my services.cfg, I removed the HOSTIP of my box and reloaded the configuration and it worked.

This tells me that the arguments in my checkcommands.cfg were right but I did NOT have to specify the IP of the host in services.cfg.

Here is how it’s configured and working . . .

CHECKCOMMANDS:
$USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o $ARG2$ -w $ARG3$ -c $ARG4$

SERVICES:
check_snmp!passwd!oid!warning!critical

Anyway, that caused the web interface to spit out the correct response for that OID and based on my warning and critical threshold settings, alert me of any problems. PROBLEM FIXED. THANKS FOR ALL THE HELP !!!

I missed that in your previous post. Good catch.