This is a discussion on RE: Logfile monitoring within the SNMP Users forums, part of the Networking and Network Related category; > From: net-snmp-users-bounces@lists.sourceforge.net > [mailto:net-snmp-users-bounces@lists.sourceforge.net] On > ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
> From: net-snmp-users-bounces@lists.sourceforge.net > [mailto:net-snmp-users-bounces@lists.sourceforge.net] On > Behalf Of Joe Warren-Meeks > Sent: Tuesday, October 02, 2007 8:11 AM > Is it possible to configure net-snmp to tail a logfile and each time > it finds a regexp match, send a trap with the text to a traphost? This is not the sort of thing you want to do with an agent. Rather, a self standing application is more appropriate. There are two ways to do it. If the set of trap destinations is known and fixed, you can write a script which monitors the file and uses the snmptrap command to send the traps. For dynamic hosts, I would suggest creating a MIB object which always sends a trap when set. The script can set that variable whenever it discovers the magic text, causing the subagent to send the trap, which is sent to all configured receivers by the master agent. Naturally, you could also embed the script into the subagent, thus eliminating the need for the MIB object, but that is a bit of a tricky operation. HTH, Mike ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ 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/...net-snmp-users |
![]() |
| Thread Tools | |
| Display Modes | |
|
|