RE: Logfile monitoring

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 > ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-03-2007
Mike Ayers
 
Posts: n/a
Default RE: Logfile monitoring


> 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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:46 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0