Hi,
Thanks all of you, i am still unable to get out put on opennms, is there
any way that i can generate mail on this trigger.
Thanks
M
-------- Original Message --------
Subject: Re: String monitoring
From: Haskins, Russell T. <russell.hask...@gd-ais.com>
To: Mike Ayers <mike_ay...@tvworks.com>, Mudassar
<mudas...@innovative-pk.com>
Cc: "net-snmp users" <net-snmp-users@lists.sourceforge.net>
Date: 10/30/2009 4:21 AM
The "." matches a single character so I don't believe his expression will work,
something like
GET[.].......HTTP[.]......
Might work for his example below.
-----Original Message-----
From: Mike Ayers [mailto:mike_ay...@tvworks.com]
Sent: Thursday, October 29, 2009 2:55 PM
To: Haskins, Russell T.; Mudassar
Cc: net-snmp users
Subject: RE: String monitoring
From: Haskins, Russell T. [mailto:russell.hask...@gd-ais.com]
Sent: Thursday, October 29, 2009 2:30 PM
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.
Yes, but '.' means "match anything", so his expression should work, if
regexps are being used, but his results imply that they are not, and that the string is
only matched literally.
From: Mudassar [mailto:mudas...@innovative-pk.com]
Sent: Thursday, October 29, 2009 2:04 PM
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?
Hmmm... can you try "GET*HTTP*" and see if it's globbing instead?
HTH,
Mike
------------------------------------------------------------------------------
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