Re: Pass the port number to an extension command in snmpd.conf

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 14 January 2011 14:56, Wes Hardaker <[email protected]> wrote:
>
> VC> pass_persist .1.3.6.1.4.1.1206 /usr/bin/custom_app 5200
>
> VC> What I want to do is pass the port number that the request came in on to
> VC> custom_app as a parameter, instead of "5200" above.
>
> Unfortunately, you can't do that.  In fact, the transport system is
> designed *not* to pass that type of information all over the place.

There's also another (fundamental) problem with this idea.
The point of "pass_persist"  (as opposed to "pass") is that the
program is invoked *once*, triggered by the first request for this subtree.
It then keeps running, in order to respond to subsequent requests
without needing to be re-run.

So if the first request came in on 5201, then the app would be invoked
as   "custom_app 5201".
   If another request then came in on 5202,  this would be processed
by the same running app - so the arguments would still be the same.

Dave

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
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.