On 11 August 2011 01:56, Chris Bartram <[email protected]> wrote:
> I have a script receiving output from snmptrapd; it does a simple read
> <STDIN> and breaks each line into an oid/value pair.

> It appears that for some VMWare SNMP traps - one (STRING) field of which
> happens to be full of "token:" type strings - the parser is breaking this
> single field down into multiple input lines - apparently getting confused by
> the embedded tokens: in the line? It obviously wreaks havoc on the script.

One possibility might be to use the 'outputOption' and/or 'format2' directives
to control the format of how the trap is passed from snmptrapd to the
traphandler script.  In particular, if the varbinds are separated by new-line
characters, then the traphandler parsing wouldn't need to be concerned
with identifying colon separators.

I haven't actually tried this, but it's worth investigating.

Dave

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to