Page 1 of 1

[SOLVED]Snmp V3

Posted: Mon Mar 18, 2013 8:23 am
by tartarus
Hello,

I am not able to solve my problem since 3 days :(
I am using FAN to make my test.

For the moment i am using command line directly (
sh-3.2$ pwd
/usr/lib64/nagios/plugins )


I want to monitore Cisco Nexus 5K ( and toher in the future ), this equipement use this : snmpv3, with SHA and DES.

To make my test i use this user : testuser
With this password : passwd
And this IP ( for exemple ) : 10.10.10.254

With snmpwalk i get all the informations (typing this command line ) :

Code: Select all

snmpwalk -v 3 -u testuser -l authPriv -a SHA -A passwd -x DES -X passwd 10.10.10.254
After that i tried to use this :

Code: Select all

sh-3.2$ ./check_centreon_snmp_traffic -H 10.10.10.254 -v 3 -u testuser -p passwd 
but i get this message :

Code: Select all

UNKNOWN: SNMP Session : Received usmStatsWrongDigests.0 Report-PDU with value 13 during synchronization
I read this message so many times :x
After that i using help to solve my problem but i found any thinhs which can help me to use SHA or other parameters.

Now i am trying with this plugin : check_snmp_int.pl

Code: Select all

sh-3.2$ ./check_snmp_int.pl -v 3 -H 10.10.10.254  -l testuser -x passwd -X passwd -L SHA DES
and i get this :

Code: Select all

Usage: ./check_snmp_int.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>)  [-p <port>] -n <name in desc_oid> [-i -a -D] [-r] [-f[eSyY]] [-k[qBMGu] -g -w<warn levels> -c<crit levels> -d<delta>] [-o <octet_length>] [-t <timeout>] [-s] --label [-V]
I am doing something wrong, but i don't understand what :cry:

Do you know how to use this commands ?
Thank you ! :mrgreen:

Tart'

Re: Snmp V3

Posted: Mon Mar 18, 2013 12:35 pm
by scottwilkerson
how about the standard check_snmp that comes with the nagios plugins

Code: Select all

./check_snmp -P 3 -U testuser -L authPriv -a SHA -A passwd -x DES -X passwd 10.10.10.254 -o <YOUR_OID>

Re: Snmp V3

Posted: Tue Mar 19, 2013 10:45 am
by tartarus
With this command it's works great.

Code: Select all

    ./check_snmp -P 3 -U testuser -L authPriv -a SHA -A passwd -x DES -X passwd 10.10.10.254 -o  SNMPv2-MIB::sysDescr.0
Example :
SNMP OK - Cisco NX-OS(tm) n5000, Software (n5000-uk9), Version 5.0(3)N2(1), RELEASE SOFTWARE Copyright (c) 2002-2011 by Cisco Systems, Inc. Device Manager Version 5.2(1), Compiled 6/13/2011 6:00:00 |

But i dont understand how i can monitore it ?


With SNMP V3 on nagios, i need to do macro or another things to run this command for "each" MIB and graph them ?

Thank you

Re: Snmp V3

Posted: Tue Mar 19, 2013 12:26 pm
by abrist
You will have to create a command definition, a service check, and a host definition in the nagios cfg files. Some of the snmp checks will not include performance data, like your system description mib, as it just returns a string without the "| <perfdata>".

You could use macros for your mibs, or just include them in the service check definition.

You should read through the quickstart guide to get more acquainted with how the nagios configuration process works.

Re: Snmp V3

Posted: Thu Mar 21, 2013 3:33 am
by tartarus
Hello,
Thank you for your reply.



i applid what you said and now :


1 - I make a command to check if host is available
2 - During the creation of the host i put my command check
3 - DUring the test i only check if host is avaiable with my command, it's UP so my check command is ok !
4 - Finally i created another command to check the traffic on one interface (plugin check int)
BW Ethernet1/1 OK 13m 48s 20/03/2013 16:41:27 1/7 (H) Ethernet1/1:UP (4.0KBps/21.0KBps):1 UP: OK
Now it's seems to be good but don't graph :/

The content of the tab of my service :

Service Extended Info



Centreon
Graph Template Traffic
Categories
Available Selected
Traffic


I have check with the web interface centstorage :
Host Service Metrics Rebuild Waiting Hidden Locked Storage Type
8.8.8.8 PING time (ms) - ok No No No RRDTool & MySQL
Centreon-Server / size (B) - used (B) No No No RRDTool & MySQL
load load1 - load5 - load15 No No No RRDTool & MySQL
memory used (o) - size (o) No No No RRDTool & MySQL
ping time (ms) - ok No No No RRDTool & MySQL


i see the default host and 8.8.8.8 i insert it this host at the begining with standard ping service to check if it makes graph and it does it.
Why my own service (which work well like i said before) is not here ? :cry: i don't inderstand.

Anybody get the same issue ?

Thank you !

Re: Snmp V3

Posted: Thu Mar 21, 2013 6:18 am
by tartarus
I found the solution !

I get no perf data return by my command.
I miss one argument : -f

Really, stupid problem but i was hard to find :D

Thank you !

Re: [SOLVED]Snmp V3

Posted: Thu Mar 21, 2013 9:45 am
by slansing
Oh excellent! Glad to see the solution was so simple, closing as resolved.