Re: String monitoring

Mudassar <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
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. <[email protected]>
To: Mike Ayers <[email protected]>, Mudassar 
<[email protected]>
Cc: "net-snmp users" <[email protected]>
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:[email protected]] 
> 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:[email protected]]
>> 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:[email protected]]
>> 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
[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.