LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   nagios + snmp (https://www.linuxquestions.org/questions/linux-server-73/nagios-snmp-575056/)

aeby 08-06-2007 06:17 AM

nagios + snmp
 
Hi ,
I have successfully installed nagios-snmp plugins in C . the installtion went well. But when i try and issue the command
./check_snmp_int -H 10.0.0.99 -C public -n zzzz -v
it gives me the following error.

V1 login : public
Error reading table : (null)
.

I think it has something to do with the MIB table, i have not done any configuration on MIB.I just know that it is a sort of data storage, i am planning to implement nagios for a network and monitro the total bandwith on the lines. I dont know where i wil find the mib file for that and where am i supposed to put it so that snmp can read it.

I am new to Mib so can anyone please guide me , i need an mib file to a host which is a normal linux gateway .

Thanks in advance.
Kind Regards,

umarzuki 08-29-2009 07:38 AM

Quote:

Originally Posted by aeby (Post 2849539)
Hi ,
I have successfully installed nagios-snmp plugins in C . the installtion went well. But when i try and issue the command
./check_snmp_int -H 10.0.0.99 -C public -n zzzz -v
it gives me the following error.

V1 login : public
Error reading table : (null)
.

I think it has something to do with the MIB table, i have not done any configuration on MIB.I just know that it is a sort of data storage, i am planning to implement nagios for a network and monitro the total bandwith on the lines. I dont know where i wil find the mib file for that and where am i supposed to put it so that snmp can read it.

I am new to Mib so can anyone please guide me , i need an mib file to a host which is a normal linux gateway .

Thanks in advance.
Kind Regards,

perhaps wrong OID specified.
try snmpwalk to that gateway, lots of OIDs will be shown or use somekind of mib walker program then use it like this
# ./check_snmp -H <gateway-ip> -C <community-string> -P 1 -o <OID-name>

kirukan 08-29-2009 01:21 PM

Quote:

./check_snmp_int -H 10.0.0.99 -C public -n zzzz -v
it gives me the following error.

V1 login : public
Error reading table : (null)
i think you have referred the sample from following website (http://nagios.manubulon.com/snmp_int.html) you can define multiple interface by -n option.
"zzzz" actually this is not the way to define multiple interfaces. this just an example.

Try like this
Quote:

./check_snmp_int -H 172.16.7.212 -C public -n eth0 eth1 -v
and further idea refer this url
http://nagios.manubulon.com/index_commands.html, and look this example how they defined multiple interface

Quote:

define command{
command_name check_snmp_int_v1
command_line $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ $USER7$ -n $ARG1$ $ARG2$
}
Quote:

Oooh sorry this is almost 2years old post,i didn't refer the original date

umarzuki 08-29-2009 11:15 PM

from that url, i came to this:
Code:

define command {
        command_name check_snmp
        command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $COMMUNITY$ -o $OID$
}

define service {
        use                            local-service
        host_name                      win2003
        service_description            Checks disk capacity
        check_command                  check_snmp!192.168.56.2!public!HOST-RESOURCES-MIB::hrDiskStorageCapacity.6
}

but the result is SNMP problem - No data received from host on the Information column for that particular host Service Status Details For Host...

I derived that from this command
Code:

/usr/lib/nagios/plugins/check_snmp -H 192.168.56.2 -C public -o HOST-RESOURCES-MIB::hrDiskStorageCapacity.6
with this output
Code:

SNMP OK - 2093804 KBytes |
I don't know why is that pipe sign showed up but why the same did not work for the check_command in host file?


All times are GMT -5. The time now is 04:40 PM.