Re: My check_snmp command doesn´t work for switch monitoring
Posted: Fri Jun 05, 2015 12:25 pm
when i put the command " snmpget -v 2c public 192.168.1.20 .1.3.6.1.2.1.1.3.0" it shows this :
when i put the command "ll /usr/share/snmp/mibs" it shows this :
Code: Select all
No community name specified.
USAGE: snmpget [OPTIONS] AGENT OID [OID]...
Version: 5.7.2
Web: http://www.net-snmp.org/
Email: [email protected]
OPTIONS:
-h, --help display this help message
-H display configuration file directives understood
-v 1|2c|3 specifies SNMP version to use
-V, --version display package version number
SNMP Version 1 or 2c specific
-c COMMUNITY set the community string
SNMP Version 3 specific
-a PROTOCOL set authentication protocol (MD5|SHA)
-A PASSPHRASE set authentication protocol pass phrase
-e ENGINE-ID set security engine ID (e.g. 800000020109840301)
-E ENGINE-ID set context engine ID (e.g. 800000020109840301)
-l LEVEL set security level (noAuthNoPriv|authNoPriv|authPriv)
-n CONTEXT set context name (e.g. bridge1)
-u USER-NAME set security name (e.g. bert)
-x PROTOCOL set privacy protocol (DES|AES)
-X PASSPHRASE set privacy protocol pass phrase
-Z BOOTS,TIME set destination engine boots/time
General communication options
-r RETRIES set the number of retries
-t TIMEOUT set the request timeout (in seconds)
Debugging
-d dump input/output packets in hexadecimal
-D[TOKEN[,...]] turn on debugging output for the specified TOKENs
(ALL gives extremely verbose debugging output)
General options
-m MIB[:...] load given list of MIBs (ALL loads everything)
-M DIR[:...] look in given list of directories for MIBs
(default: /home/c4sonora/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mib s/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/ share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp)
-P MIBOPTS Toggle various defaults controlling MIB parsing:
u: allow the use of underlines in MIB symbols
c: disallow the use of "--" to terminate comments
d: save the DESCRIPTIONs of the MIB objects
e: disable errors when MIB symbols conflict
w: enable warnings when MIB symbols conflict
W: enable detailed warnings when MIB symbols conflict
R: replace MIB symbols from latest module
-O OUTOPTS Toggle various defaults controlling output display:
0: print leading 0 for single-digit hex characters
a: print all strings in ascii format
b: do not break OID indexes down
e: print enums numerically
E: escape quotes in string indices
f: print full OIDs on output
n: print OIDs numerically
q: quick print for easier parsing
Q: quick print with equal-signs
s: print only last symbolic element of OID
S: print MIB module-id plus last element
t: print timeticks unparsed as numeric integers
T: print human-readable text along with hex strings
u: print OIDs using UCD-style prefix suppression
U: don't print units
v: print values only (not OID = value)
x: print all strings in hex format
X: extended index format
-I INOPTS Toggle various defaults controlling input parsing:
b: do best/regex matching to find a MIB node
h: don't apply DISPLAY-HINTs
r: do not check values for range/type legality
R: do random access to OID labels
u: top-level OIDs must have '.' prefix (UCD-style)
s SUFFIX: Append all textual OIDs with SUFFIX before parsing
S PREFIX: Prepend all textual OIDs with PREFIX before parsing
-L LOGOPTS Toggle various defaults controlling logging:
e: log to standard error
o: log to standard output
n: don't log at all
f file: log to the specified file
s facility: log to syslog (via the specified facility
...
...
...
... )
when i put the command "ll /usr/share/snmp/mibs" it shows this :
Code: Select all
total 296
drwxr-xr-x 2 root root 4096 Jun 5 09:23 ./
drwxr-xr-x 5 root root 4096 Jun 4 11:10 ../
-rw-rw-r-- 1 c4sonora c4sonora 68104 May 26 2011 DISMAN-EVENT-MIB.txt
-rw-r--r-- 1 root root 1913 Apr 8 2014 GNOME-SMI.txt
-rw-r--r-- 1 root root 5931 Oct 9 2012 LM-SENSORS-MIB.txt
-rw-r--r-- 1 root root 15901 Oct 9 2012 NET-SNMP-AGENT-MIB.txt
-rw-r--r-- 1 root root 9160 Oct 9 2012 NET-SNMP-EXAMPLES-MIB.txt
-rw-r--r-- 1 root root 9326 Oct 9 2012 NET-SNMP-EXTEND-MIB.txt
-rw-r--r-- 1 root root 2036 Oct 9 2012 NET-SNMP-MIB.txt
-rw-r--r-- 1 root root 1215 Oct 9 2012 NET-SNMP-MONITOR-MIB.txt
-rw-r--r-- 1 root root 3350 Oct 9 2012 NET-SNMP-PASS-MIB.txt
-rw-r--r-- 1 root root 2504 Oct 9 2012 NET-SNMP-PERIODIC-NOTIFY-MIB.t xt
-rw-r--r-- 1 root root 1226 Oct 9 2012 NET-SNMP-SYSTEM-MIB.txt
-rw-r--r-- 1 root root 4814 Oct 9 2012 NET-SNMP-TC.txt
-rw-r--r-- 1 root root 5039 Oct 9 2012 NET-SNMP-VACM-MIB.txt
-rw-rw-r-- 1 c4sonora c4sonora 14565 Jun 4 12:37 SNMPv2-MIB-V1SMI.my
-rw-r--r-- 1 root root 14565 Jun 4 13:02 SNMPv2-MIB-V1SMI.txt
-rw-r--r-- 1 root root 2163 Oct 9 2012 UCD-DEMO-MIB.txt
-rw-r--r-- 1 root root 4613 Oct 9 2012 UCD-DISKIO-MIB.txt
-rw-r--r-- 1 root root 3087 Oct 9 2012 UCD-DLMOD-MIB.txt
-rw-r--r-- 1 root root 6476 Oct 9 2012 UCD-IPFILTER-MIB.txt
-rw-r--r-- 1 root root 8118 Oct 9 2012 UCD-IPFWACC-MIB.txt
-rw-r--r-- 1 root root 18274 Oct 9 2012 UCD-SNMP-MIB-OLD.txt
-rw-r--r-- 1 root root 48890 Oct 9 2012 UCD-SNMP-MIB.txt