Re: how to modify the output of an smpset command

Jordi Moles <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi,

yes, i'm extending the agent, sorry for not giving that information.

anyway... thanks for the information, i'll look for another way.

i'll put you into situation to see if i can actually do what i'm planning.

Example: i want to create folders from snmp.

let's say i run something like this:

***********************

snmpset -v 2c -c mykey localhost .1.3.6.1.4.1.2021.255.8.1.9 s "create...folder1"

*****************************

and i want snmp to create the folder1 and return if it has been created 
or not.
So... knowing that snmpset can't return a personalised "OK" 
message........ could i perform a snmpset to store that 
"create...folder1" value somewhere in the snmp tree and then run a 
snmpget which performs de "mkdir" and returns "OK" or "NOK"?

could i do that with extended snmp and perl?


En/na Dave Shield ha escrit:
> On 12/03/2008, Jordi Moles <[email protected]> wrote:
>   
>>  i'm using perl to extend the functionality of snmp.
>>     
>
> Extending the agent, I presume.
>
>   
>>  The thing is that if i run this command:
>>
>>  ********
>>  snmpset -v 2c -c mykey localhost .1.3.6.1.4.1.2021.255.8.1.9 s
>>  "delete...bustia01"
>>  ********
>>     
>
>   
>>  i get this in the shell.......
>>
>>  ********
>>  UCD-SNMP-MIB::ucdavis.255.8.1.2 = STRING: "delete...bustia01"
>>  ********
>>     
>
> That's correct.
> The specification of SNMP states that the response to a SET request
> will contain the exact same set of varbinds.
>
>
>   
>>  so... what i would like to do is replacing this "STRING:
>>  "delete...bustia01" witch something else dynamically
>>     
>
> Sorry - SNMP doesn't work that way.
> The response will include the same value as was SET.
> You can't change that.
>
> Dave
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> 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
>
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.