[SOLVED]Snmp V3

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
tartarus
Posts: 4
Joined: Mon Mar 18, 2013 8:13 am

[SOLVED]Snmp V3

Post 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'
Last edited by tartarus on Thu Mar 21, 2013 6:19 am, edited 1 time in total.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Snmp V3

Post 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>
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
tartarus
Posts: 4
Joined: Mon Mar 18, 2013 8:13 am

Re: Snmp V3

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Snmp V3

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
tartarus
Posts: 4
Joined: Mon Mar 18, 2013 8:13 am

Re: Snmp V3

Post 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 !
tartarus
Posts: 4
Joined: Mon Mar 18, 2013 8:13 am

Re: Snmp V3

Post 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 !
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: [SOLVED]Snmp V3

Post by slansing »

Oh excellent! Glad to see the solution was so simple, closing as resolved.
Locked