Can snmpd do different actions based on incoming port?
JP Vossen <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
I've been fiddling and Googling on this for a few days and getting
nowhere, so I thought I'd ask here. Sorry if this is covered elsewhere
or totally obvious; I'm not finding it.
I know I can use one or more "forward default 10.10.10.10:162" lines in
'snmptrapd.conf' to forward traps to another host. I also know I can
listen on more than 1 port, say 162 and 5162 [1]. Once I do that, I'd
like to do something different based on which port the trap came in on.
At a high level can I do this?
Trap comes in on 162:
1) Write to file
2) Forward to another machine or two
3) Done
Trap comes in on 5162:
1) Write to file
2) Done
This is global, not based on OID (hence "forward default") or anything
other than incoming port. Can I forward traps coming in to 162 while
not forwarding traps coming in to 5162 while writing all traps to the
same place?
I'm running CentOS-5 with stock net-snmp-5.3.2.2-9.el5_5.1 and
net-snmp-libs-5.3.2.2-9.el5_5.1 if it matters, though I'm open to
upgrading to a newer version if needed (clues about CentOS-5 usable RPMS
appreciated).
Thanks!
JP
________________________
[1] CentOS multi-port listen: /etc/sysconfig/snmptrapd.options
OPTIONS="-c $config -n -Lf $logfile -p $pidfile udp:162,udp:5162"
----------------------------|:::======|-------------------------------
JP Vossen, CISSP |:::======| http://bashcookbook.com/
My Account, My Opinions |=========| http://www.jpsdomain.org/
----------------------------|=========|-------------------------------
"Microsoft Tax" = the additional hardware & yearly fees for the add-on
software required to protect Windows from its own poorly designed and
implemented self, while the overhead incidentally flattens Moore's Law.
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
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