On 13/04/07, Charles Sprickman <[EMAIL PROTECTED]> wrote: > In snmpd.conf I have something like this: > > exec .1.3.6.1.4.1.2021.9100.1 QmailQueue1 /usr/local/adm/bin/qm-stat-cat.sh 1 > exec .1.3.6.1.4.1.2021.9100.2 QmailQueue2 /usr/local/adm/bin/qm-stat-cat.sh 2 > exec .1.3.6.1.4.1.2021.9100.3 QmailQueue3 /usr/local/adm/bin/qm-stat-cat.sh 3 > > It does work, but I'm totally lost on how to make sure these values, which > are always integers are reported as such.
> > toolbox[~]# snmpwalk -v1 -c foo h07 1.3.6.1.4.1.2021.9100.1.101.8 > UCD-SNMP-MIB::ucdavis.9100.1.101.8 = STRING: "0" The agent does not know what output will be produced by an arbitrary command, so always reports it as a string. This means that MRTG, etc cannot generate a graph from it. You'd need to adjust the 'qm-stat-cat' script to return the numeric value as the *exit* status from the script, and then retrieve (and monitor) the OID UCD-SNMP-MIB::ucdavis.9100.1.100 Note that the MIB structure generated by exec {OID} {NAME} .... is not strictly legal, and this directive has been withdrawn as from release 5.4 and above. Instead, you should use extend {OID} {NAME} ..... which generates a different (legal!) format for the results. 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