[2013/05/31 05:11:31] #net-snmp <grummund> Hi all
[2013/05/31 12:17:50] #net-snmp <NewBur> Hello All. We have a SBC running linux and net snmp v5.4.21. I have created some custom OIDS that return strings. This is all tested and working for some time with many SNMP management programs and MIB browsers (Ireasoning, etc). Even PHP can pull strings using our custom OIDS using snmp V1, V2c, and V3. One of our customers has a management program that can pull system string OIDS like
[2013/05/31 12:17:50] #net-snmp <NewBur> sysname.0 and sysdesc.0 with no problem. But when they try pulling strings with using custom OIDS then the return values are in hex. The hex values do convert to the expected return string. Can anyone tell me why that would be and what I can do to fix it?
[2013/05/31 12:35:22] #net-snmp <fenestro> Are they using the command-line snmp* tools with -Ox ?
[2013/05/31 12:44:06] #net-snmp <NewBur> No, its a management system. The package they are using is from Castle Rock
[2013/05/31 12:45:28] #net-snmp <fenestro> You can't do anything to fix it. What you're describing is a client issue.
[2013/05/31 12:45:38] #net-snmp <rstory-work> do the custom OIDs have associated MIBs defined?
[2013/05/31 12:46:11] #net-snmp <fenestro> oh, right, rstory is right. If they're doing the equivalent of -Ox, then you *can* do something about it by giving them a MIB with a Display-Hint.
[2013/05/31 12:46:38] #net-snmp <NewBur> rstory, yes I made a MIB file that they load in.
[2013/05/31 12:47:09] #net-snmp <rstory-work> can you pastebin the definition for one of the objects they are having issues with?
[2013/05/31 12:47:35] #net-snmp <NewBur> ok.. will take me a minute to set that up. thanks,
[2013/05/31 12:48:39] #net-snmp <NewBur> btw.. i downloaded a trial version of the castle rock program and without loading the mib I manually typed in our custom OID and it returned the hex values as they describe.
[2013/05/31 12:48:57] #net-snmp <rstory-work> ah.. try loading the mib
[2013/05/31 12:49:35] #net-snmp <NewBur> When they load the mib, it still returns the hex strings. I will confirm that.
[2013/05/31 12:50:39] #net-snmp <fenestro> If that's true, I guess it's rude to say "get a better NMS"
[2013/05/31 12:51:33] #net-snmp <NewBur> fenestro, thats what ive been thinking since many other programs have no problem.
[2013/05/31 12:52:13] #net-snmp <NewBur> Instead of the paste-bin thing. Can you download our mib file from our website. Its a zipped text file. http://www.remotemonitoringsystems.ca/rms200/downloads/ETHERTEK-MIB.zip
[2013/05/31 12:53:58] #net-snmp <fenestro> You probably want to use DisplayString instead of OCTET STRING for the things that are supposed to be displayable text
[2013/05/31 12:54:06] #net-snmp <fenestro> or include a DISPLAY-HINT
[2013/05/31 12:54:39] #net-snmp <NewBur> i figured out pastebin :| http://pastebin.com/L4BDA9bS
[2013/05/31 12:56:41] #net-snmp <NewBur> The program I used to create the mib was MG-SOFT Visual MIB Builder Version 7.0
[2013/05/31 12:57:22] #net-snmp <NewBur> fenestro, what does the DISPLAY HINT line look like?
[2013/05/31 12:58:21] #net-snmp <rstory-work> DISPLAY-HINT "255a"
[2013/05/31 12:59:32] #net-snmp <rstory-work> which would mean an ascii string up to 255 chars long..
[2013/05/31 13:00:33] #net-snmp <NewBur> rstory.. u answered my question before i could finish typing it :) Where in the mib file should i put that?
[2013/05/31 13:07:56] #net-snmp <NewBur> In my MIB builder program, it does not give an option for DisplayString, only OCTET STRING.
[2013/05/31 13:08:37] #net-snmp <rstory-work> then you might have to add it manually in a text editor..
[2013/05/31 13:10:53] #net-snmp <NewBur> that would be a bit brutal. Should I use both DisplayString instead of OCTET STRING and DISPLAY-HINT "255a" ?
[2013/05/31 13:12:14] #net-snmp <rstory-work> that would be best.. assuming your fields fit the DisplayString textual convention... which means no more than 255 chars..
[2013/05/31 13:12:33] #net-snmp <NewBur> ok my bad, find/replace would change all OCTET STRING to DisplayString.
[2013/05/31 13:12:48] #net-snmp <rstory-work> if your fields can be longer, or contain non-ascii printable text, you'd probably be best off defining your own textural convention..
[2013/05/31 13:13:23] #net-snmp <NewBur> Only 1 OID has more than 255 chars.. can i use DISPLAY-HINT "1024a" ?
[2013/05/31 13:14:29] #net-snmp <rstory-work> yes.. but looking through all my mibs, it seems that display hints are just used in textual conventions.. so you'll need to define a textual convention and use that instead of octet string..
[2013/05/31 13:15:51] #net-snmp <NewBur> can you point me to some docs on making custom textual conventions? or pastebin me an example?
[2013/05/31 13:16:51] #net-snmp <NewBur> can you recommend a better mib builder program that can do that, or does everyone use hack by hand for this?
[2013/05/31 13:17:32] #net-snmp <rstory-work> http://www.ietf.org/rfc/rfc1903.txt has examples... and I build my mibs by hand..
[2013/05/31 13:18:31] #net-snmp <NewBur> ok thanks... I will play around with this.
[2013/05/31 13:22:32] #net-snmp <NewBur> rstory... does this look right? http://pastebin.com/MHufZQwk
[2013/05/31 13:25:22] #net-snmp <fenestro> similarly, I only ever write MIBs by hand or write my own MIB generators
[2013/05/31 13:25:36] #net-snmp <fenestro> YOu need quotes around "my description", but I htink it looks OK otherwise
[2013/05/31 13:25:51] #net-snmp <fenestro> and, you will be happier if you give it a name other than MyDisplayString :-)
[2013/05/31 13:26:43] #net-snmp <NewBur> fenestro, lol agreed.. do i put that at the top of the mib file somewhere, or is there a specific location for it?
[2013/05/31 13:29:44] #net-snmp <fenestro> There is no specific location for it.
[2013/05/31 13:30:56] #net-snmp <NewBur> ok thanks fenestro.
<-- mron has left #net-snmp
[2013/05/31 16:29:23] #net-snmp <NewBur> Hi Guys, just a quick update. Adding a custom textual convention with a display hint still results in the Castle Rock NMS displaying the hex representation of strings. Shazbot!
[2013/05/31 17:03:35] #net-snmp <rstory-work> hmm.. does the string have any non-printable characters in it?