Re: string as index of a table
sarath azad <[email protected]>
| Newsgroups | gmane.network.net-snmp.devel,gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Niels, But using a query like: snmpwalk $host <OID of table>.1.<column>.\"ABCDE\" is not working also. Below are the test results : snmpget $host <OID of table>.1.<column>.10."66.67.68.69.70.71.72.73.74.75" <OID of table>.1.<column>."BCDEFGHIJK" = INTEGER: 0 snmpget $host <OID of table>.1.<column>.10.\"ABCDEFGHIJ\" <OID of table>.1.<column>.10."ABCDEFGHIJ": Unknown Object Identifier (Index out of range: "ABCDEFGHIJ") snmpget $host <OID of table>.1.<column>.10.'ABCDEFGHIJ' <OID of table>.1.<column>.10.ABCDEFGHIJ: Unknown Object Identifier (Index out of range: ABCDEFGHIJ ) Could you please help in resolving this? Thanks and regards S Sarath On Thursday, October 16, 2014 10:00 PM, Niels Baggesen <[email protected]> wrote: On Thu, Oct 16, 2014 at 11:04:54PM +0800, sarath azad wrote: > I have tested it, it is feasible, but while giving the OID in snmpget, > we needed to give the item name string index by dot separated ascii > values of each character in the name. > eg. <OID of the table> .1.<column > no.>.5."65.66.67.68.69" where the item name is "ABCDE". I wonder where this is documented :-( If you make sure that the shell passes the quotes to the command, you can actually do it: snmpwalk $host <OID of table>.1.<column>.\"ABCDE\" If the index is an IMPLIED string (one without a length prefix) you must use single quotes in stead of double quotes. See the -OE option to snmpcmd(1) /Niels -- Niels Baggesen - @home - Århus - Denmark - [email protected] The purpose of computing is insight, not numbers --- R W Hamming ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders