Thank you Yes I'm referring to the snmpInBadCommunityNames.0 I'm using snmpget-v1-c public Can you help me start it ..for (concentrators, routers)
I thank you so much This is my first time T -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Adam Augustine Sent: Friday, May 29, 2009 8:32 AM To: BYU Unix Users Group Subject: Re: [uug] SNMP Lemseffer. Tahar (MSA) wrote: > Hello all, > I need to retrieve The SNMP invalid community names counter for all SNMP > enabled devices in the computer system. > can anyone point me in the right direction. > Thanks > Tahar > Probably the easiest way to do this would be to use snmpget in a simple script that loops over all the device names or IP addresses. I am assuming you are referring to the snmpInBadCommunityNames variable (full path is .iso.org.dod.internet.mgmt.mib-2.snmp.snmpInBadCommunityNames, and the OID is .1.3.6.1.2.1.11.4). So the heart of the loop would contain something like: snmpget -v 2c -c putyourcommunitynamehere puttheipaddresshere .1.3.6.1.2.1.11.4 Depending on whether the devices are using SNMP version 1, 2c, or even 3you will need to change the -v option. If you wish to do it in Perl you would probably want to use the Net::SNMP module, which is documented at http://search.cpan.org/~dtown/Net-SNMP-5.2.0/lib/Net/SNMP.pm . You of course would need to know the addresses or hostnames in advance, as well as the community string(s). There isn't, to my knowledge, a simple way of discovering which boxes are running SNMP without already knowing the community string and the SNMP version number, since SNMP won't respond if anything is incorrect with the SNMP query, so simple nmap scans don't work very well. -------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list ____________________________________________________________________________ EMAIL DISCLAIMER: This email and any attachments thereto may contain private, confidential, and privileged material for the sole use of the intended recipient. Any review, copying, or distribution of this email (or any attachments thereto) by other than the intended recipient is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently delete the original and any copies of this email and any attachments thereto. _____________________________________________________________________________ -------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list
