A few months ago I was having trouble sending traps that contained a
DateAndTime argument. The suggestion I got from this list (thank you!) was to
take the binary data that was returned from my call to date_n_time() and
convert it to printable hex. I then called snmptrap and passed it a "-x" arg
to specify that the timestamp arg I was passing it was in hex format. That
worked great! My trap receiver loads my custom MIB, which lets it know that
that OID is in DateAndTime format. My custom timestamp contained in the trap
was displayed correctly by the trap receiver.
I'm trying to figure out how to do something similar with my pass-through
program (I have a custom MIB I created) for SNMP polling. One of the OIDs I
would like my custom program to return is a timestamp in DateAndTime format.
However, according to the man pages for snmpd.conf (pass-through support) I can
only specify a return type of "one of the text strings integer, gauge, counter,
timeticks, ipaddress, objectid, or string". I tried a return value of 'string'
but that didn't seem to work. My snmpwalk is (obviously) showing the wrong
timestamp:
MY-MIB::myDateAndTime.0 = STRING:
12343-100-56,48:97:49.101,0102:4998484948485010048524848
This doesn't suprise me since I couldn't specify that the string was in hex.
Since it was being treated as a normal string it was incorrectly interpreted.
Any suggestions?
_________________________________________________________________
Want to read Hotmail messages in Outlook? The Wordsmiths show you how.
http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders