Logfile monitoring

Joe Warren-Meeks <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hey guys,

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?

For example, every now and then I might get the following in my logfile:

MyApplicationAlert: foo not found
MyApplicationAlert: bar located

So, I want to find the MyApplicationAlert string and send a trap with  
the random text after that string to my traphost.

I could write an extension to run a shell script, which will grep for  
that, but then that would send a trap every time, even for old alerts  
(unless I made it a very complicated stateful script). logMatch  
doesn't seem to allow random string data to turn up in the return  
values.

Any clues or pointers? Anyone done something like this?

  -- joe.

http://www.nativ-systems.com/  CONSULTING  ·  TECHNOLOGY  ·  OUTSOURCING
Nativ Systems Ltd. 23 - 25 Eastcastle Street, W1W 8DF
phone:  +44 (0)20 7580 9488     fax:    +44 (0)20 7580 9489
Company Reg No.: 6071152 Company VAT No.: 889 1875 42
Registered in England and Wales




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