Re: String monitoring

Mudassar <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi,

I add the following lines in snmpd.conf

logmatch test /var/adm/messages 1 GET.*HTTP.*
monitor -u _internal -r 2 -o logMatchFilename -o logMatchRegEx -o 
logMatchCurrentCount "String found in logfile" logMatchCounter != 0

#snmptable -v 2c -c string 10.30.40.227 logMatchTable  shows me the 
following output
 24         test   /var/adm/messages     GET.*HTTP.*                     
6                   6                      6                    
6               0             0             1           
noError                        

When i echo the test message in file

echo "GET.*HTTP.*" >> /var/adm/messages --> opennms genrate the mail 
that "GET.*HTTP.*" is occure BUT
echo "GET.hkjhkjhHTTP.789798" >> /var/adm/messages  --> no alert

Where is the problem?

M Yasin


-------- Original Message  --------
Subject: String monitoring
From: Mudassar <[email protected]>
To: net-snmp users <[email protected]>
Date: 10/30/2009 1:47 AM
> HI,
>
> I am using opennms and netsnmp to use string alerts, is it possible to 
> get the some text before and after the string mentioned for monitoring. 
> I am using the following syntax in netsnmp
>
> logmatch string:What /var/log/messages 1 Taking over resource group
>
> Thanks
> Mudassar
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> 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
>
>   


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
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.