On 20/04/07, Charles Sprickman <[EMAIL PROTECTED]> wrote: > If I really want to have certain lines in a script that returns multiple > lines be reported as integers, is there *anything* I can do to force that? > > Is there something beyond exec and extend that would make more sense?
Let's take a step back. Fundamentally, there are two possible approaches to reporting information via SNMP. Either the data must be munged into a form that matches the MIB, or a MIB must be written that matches the format of the data. The "simple script" extension mechanisms ("exec" and "extend") use the first approach. We've defined a MIB structure that is flexible enough to handle arbitrary script output. Which means that it can't make assumptions about the format of this output, hence treating everything as text strings. (That doesn't handle binary output very well, but never mind). If you're needing to report multiple integer values, then you probably need to take the second approach, and define and implement a suitable MIB for your data. The simplest way to implement this would probably be using the "pass" directive, which also invokes a shell-script - though this would need to be tailored suitably. The other possibility it to hack the code of the 'extend' module, and have it report integer values rather than strings. That's not something we can do globally, since it wouldn't be appropriate for many situations. But if this is a private setup, then you can tweak things to your heart's content. (That's the beauty of Open Source, after all!) Dave ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users