Hi,
I have the same understanding but it is not working.....

Thanks

-------- Original Message  --------
Subject: Re: String monitoring
From: Haskins, Russell T. <russell.hask...@gd-ais.com>
To: Mudassar <mudas...@innovative-pk.com>
Cc: "net-snmp users" <net-snmp-users@lists.sourceforge.net>
Date: 10/30/2009 3:30 AM
The String you are looking for uses 'Regular Expressions', so
GET.*HTTP.* would work for GET...HTTP.... The "*" means match the
preceding element zero or more times, not match anything.

Russ...

-----Original Message-----
From: Mudassar [mailto:mudas...@innovative-pk.com] Sent: Thursday, October 29, 2009 2:04 PM
To: Mudassar
Cc: net-snmp users
Subject: Re: String monitoring

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 <mudas...@innovative-pk.com>
To: net-snmp users <net-snmp-users@lists.sourceforge.net>
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
Net-snmp-users@lists.sourceforge.net
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
Net-snmp-users@lists.sourceforge.net
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
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to