[Pkg-nagios-devel] Bug#772180: Bug#772180: check_snmp not passing community to snmpget

Jan Wagner waja at cyconet.org
Wed Aug 19 16:01:33 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

tags 772180 + moreinfo
thx

Hi Julio,

thanks for taking your time reporting your issue and sorry for taking
so long to respond.

Am 05.12.2014 um 22:19 schrieb Julio González Gil:
> When I try to run check_snmp to collect data from remote systems:
> 
> ./check_snmp -H 192.168.3.1 -C public -t 10 -o sysUpTime.0
> 
> It keeps waiting forever until I press CTRL+C to cancel.
> 
> After researching a little bit, I came to
> http://support.nagios.com/forum/viewtopic.php?f=7&t=8448 and tried
> by myself with the following results:
> 
> $ ./check_snmp -v -H 192.168.3.1 -C public -t 10 -o sysUpTime.0 & 
> [1] 3693 /usr/bin/snmpget -t 10 -r 5 -m ALL -v 1 [authpriv]
> 192.168.3.1:161 <http://192.168.3.1:161> sysUpTime.0
> 
> $ ps x PID TTY      STAT   TIME COMMAND 3693 pts/1    S      0:00
> ./check_snmp -v -H 192.168.3.1 -C public -t 10 -o sysUpTime.0 3694
> pts/1    S      0:00 /usr/bin/snmpget -t 10 -r 5 -m ALL -v 1 -c 
> 192.168.3.1:161 <http://192.168.3.1:161> sysUpTime.0
> 
> Notice the empty value for -c (community).

Which is totally okay, as it would not be good to expose the community
in the processlist.

Did you ever try to use the numeric OID?

$ snmptranslate -On SNMPv2-MIB::sysUpTime.0
.1.3.6.1.2.1.1.3.0

'./check_snmp -v -H 192.168.3.1 -C public -t 10 -o .1.3.6.1.2.1.1.3.0'

I guess the problem is, that you system doesn't know anything about
the textual MIB names. As long as snmptranslate can't translate that
to an numeric OID, this also wont work for snmpget.

Please doublecheck if snmptranslate can translate your textual MIB
name, if that works, it should also work with check_snmp.

Cheers, Jan.
- -- 
Never write mail to <waja at spamfalle.info>, you have been warned!
- -----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d-- s+: a C+++ UL++++ P+ L+++ E--- W+++ N+++ o++ K++ w--- O M V-
PS PE Y++
PGP++ t-- 5 X R tv- b+ DI D+ G++ e++ h---- r+++ y++++
- ------END GEEK CODE BLOCK------
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJV1KhdAAoJEAxwVXtaBlE+n6YQAJnlL1LN6ZLtgJe28gsLcMZS
3U7GVk+/8WazESDXtaD0chPPMygk+JOVIQCH65UoQNM7DkikLo2/1Ru9grUr/Ghp
Vrnu0F6eMltb/5Hq6NDawzBdzdAOj7YLgFrG/nkBJ1KM2z8oOBaT/M4U9HshIIKg
CMtGeBmDdVYo/HYYL+Ae2IOQ5zV4D0Zx79ePFTiwIIfs7sBarsuj0R6fV5gQmxp+
P3GMcp98cMDJvXLCGDZSYFLyYba2NJr1iBbl2l1fydeTtBJAowA3UNtywdXpqm7O
RRelnstoOKR5EsZHt8gmZTpskeZw3yV0zZ3V4kQD168L0JkXuJEwu+bZiB3hoFDe
wMkalvyZ1EjSlDw2KvXhTfECF4Q2tkYMpotz5zDwAWaO2lquC2U9MCUo0ylltASq
W7m8NdCI043q/Sux4DROT4xtAO77TCPtR2FbQyhYo/qfNw0dqKTbrkGqqKWCoFsZ
xqxSqzta7cK6QVzVtsNa15vFmfzcSVn6jMVDj3drjBOD3OFiQT7W6hrE/Ohrja8n
ErzKCe5Gn3kAbBu7kNRl+Ru6kg1tX6e+bOWVw4I85UpXgNrUlmr86n9kqUTDF5IP
BASA3mzRxHFF0I0dUYMfshFherXouPjX01JjAGzMequ0xBxdVL93tbpVV2aiJwM/
enNdcKNQgA8ITG7ELJAc
=6TZt
-----END PGP SIGNATURE-----



More information about the Pkg-nagios-devel mailing list