Re: exec deprecated
I look for the extended directive that should replace the exec, but I didn't find it. $ man snmpd.conf EXTENDING AGENT FUNCTIONALITY Arbitrary Extension Commands [snip] extend [MIBOID] NAME PROG ARGS works in a similar manner to the exec directive, but with a num- ber of improvements. Should someone give me a link about such topic and mybe an example on how use the new extended command. You use it in exactly the same way as the previous exec command: extend .1.3.6.1.4.1.17377.35.13 diskusage /bin/df -a The main difference is in the format of the output. Try configuring this entry, and running snmpwalk on this OID, and you'll see what I mean. Dave - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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
R: exec deprecated
Thanks for the amswer. I see there a lot of extra data , also for indexing a variable , so I wondering what the name are used for, it should be compose the last part of the oid but the oid is enough qualified with the index I give to it ( 12, 13 and 14 ). If , for example , I used always tha same name 'A', as in the belowe example, I should however get different oid for each command. There should be something wrong in the following configuration file extend .1.3.6.1.4.1.17377.35.12 A /bin/cat /proc/cpuinfo extend .1.3.6.1.4.1.17377.35.13 A /bin/df -a extend .1.3.6.1.4.1.17377.35.14 A /sbin/lspci give me output like this: .1.3.6.1.4.1.17377.35.12.2.1.2.1.65 = STRING: /bin/cat .1.3.6.1.4.1.17377.35.12.2.1.3.1.65 = STRING: /proc/cpuinfo ... .1.3.6.1.4.1.17377.35.13.2.1.2.1.65 = STRING: /bin/df .1.3.6.1.4.1.17377.35.13.2.1.3.1.65 = STRING: -a . .1.3.6.1.4.1.17377.35.14.2.1.2.1.65 = STRING: /sbin/lspci .1.3.6.1.4.1.17377.35.14.2.1.3.1.65 = . -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] conto di Dave Shield Inviato: giovedì 23 novembre 2006 9.56 A: Enzo Arlati Cc: net-snmp-users@lists.sourceforge.net Oggetto: Re: exec deprecated I look for the extended directive that should replace the exec, but I didn't find it. $ man snmpd.conf EXTENDING AGENT FUNCTIONALITY Arbitrary Extension Commands [snip] extend [MIBOID] NAME PROG ARGS works in a similar manner to the exec directive, but with a num- ber of improvements. Should someone give me a link about such topic and mybe an example on how use the new extended command. You use it in exactly the same way as the previous exec command: extend .1.3.6.1.4.1.17377.35.13 diskusage /bin/df -a The main difference is in the format of the output. Try configuring this entry, and running snmpwalk on this OID, and you'll see what I mean. Dave - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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
Re: R: exec deprecated
On 23/11/06, Enzo Arlati [EMAIL PROTECTED] wrote: I see there a lot of extra data , also for indexing a variable , so I wondering what the name are used for, With the old exec mechanism, the name was basically ignored, and the output of the script was rooted directly below the specified OID (in a format that was not strictly legal). This meant that you could only specify one exec entry for any given OID. The new extend mechanism uses the name token as the index to the various tables. So you can now specify several different extend tokens, using the same root OID - just as long as the names are distinct. Try it without the OID to start with (i.e. extend diskusage /bin/df -a) and then walk NET-SNMP-EXTEND-MIB::nsExtendObjects The structure of the output is exactly the same, whether it's rooted at the standard location, or a user-specified OID. [That's another difference between exec and extend - the older directive has two different MIB structures, depending on whether there was a root OID specified or not.] There should be something wrong in the following configuration file extend .1.3.6.1.4.1.17377.35.12 A /bin/cat /proc/cpuinfo extend .1.3.6.1.4.1.17377.35.13 A /bin/df -a extend .1.3.6.1.4.1.17377.35.14 A /sbin/lspci No - that should be fine. As would extend .1.3.6.1.4.1.17377.35.12 A /bin/cat /proc/cpuinfo extend .1.3.6.1.4.1.17377.35.12 B /bin/df -a extend .1.3.6.1.4.1.17377.35.12 C /sbin/lspci But you couldn't have extend .1.3.6.1.4.1.17377.35.12 A /bin/cat /proc/cpuinfo extend .1.3.6.1.4.1.17377.35.12 A /bin/df -a extend .1.3.6.1.4.1.17377.35.12 A /sbin/lspci (though I'd need to do some testing to check whether the code detects this, and complains). Note that the output structure of extend OID . is *not* the same as exec OID (not least, since this latter is not a valid MIB structure!). Dave - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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
exec deprecated
In my /usr/local/share/snmp/snmpd.conf I have some directive exec, like the one show below exec .1.3.6.1.4.1.17377.35.13 diskusage /bin/df -a The command is executed but inside the log I see a warning about deprecated exec the warning is like this: /usr/local/share/snmp/snmpd.conf: line 171: Error: WARNING: This output format is being deprecated - Please use the 'extend' directive instead I look for the extended directive that should replace the exec, but I didn't find it. Should someone give me a link about such topic and mybe an example on how use the new extended command. Regards, Enzo - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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