Thanks Dave,
It really can help....
But when I run the set command I get:
Error in packet.
Reason: notWritable (That object does not support modification)
Failed object: NET-SNMP-EXTEND-MIB::nsExtendArgs."PS"
I'm using version 5.2.1.2-4 on debian.
My snmpd.conf:
extend PS /bin/ps
I run:
snmpset -v3 ... hostname .1.3.6.1.4.1.8072.1.3.2.2.1.3.2.80.83 s "-ef"
should I add anything more? ( I've tried all the security options that
snmpd.conf offers , including the override option )
--David
Dave Shield wrote:
>On Tue, 2006-01-17 at 09:09 +0200, David Peer wrote:
>
>
>>Is it possible to pass an argument to a script/command
>>I defined in snmpd.conf OID?
>>
>>_in snmpd.conf:_
>>exec PS /bin/ps
>>
>>_and in command line tolls:_
>>snmpget -v3 ..... hostname OID {argument_to_OID}
>>
>>
>
>Not using that sort of approach.
>You'd need to set up several different "exec" commands
>(which would therefore use different OIDs), and
>retrieve the appropriate value:
>
> exec PS1 /bin/ps
> exec PS2 /bin/ps -aux
> exec PS3 /bin/ps -ef
>
>snmpget .... hostname OID1
>snmpget .... hostname OID2
>snmpget .... hostname OID3
>
>
>
>Alternatively, the newer "extend" mechanism allows
>you to configure the arguments (and input data)
>for a given command. So you could do something
>like:
>
> extend PS /bin/ps
>
>snmpset .... hostname nsExtendArgs."PS" s "-aux"
>snmpget .... hostname nsExtendOutputFull."PS"
>
>snmpset .... hostname nsExtendArgs."PS" s "-ef"
>snmpget .... hostname nsExtendOutputFull."PS"
>
>
>Not quite what you were looking for, but it might
>do the trick.
>
>Dave
>
>.
>
>
>
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
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