Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 06-09-2011, 06:19 AM   #1
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Rep: Reputation: 40
swatch: Multiple fields in "threshold track_by" statement

Hi all,

I'm trying to get the "threshold track_by" feature to span over multiple input fields, but don't seem to get it working. Currenty I've implemented the "threshold track_by" to take into account the hostname:

-- code start --
perlcode my $grab_host = '(\s\w+\s)';

watchfor /$grab_host.*throttleme/,subject=Field 1 is $1
threshold track_by=$1, type=limit, count=1, seconds=30
-- code end --

What I would like to do is to split the input string into even more fields, and use the "threshold track_by=$1,$3,$4" or something like that.

I should probably describe my goal too: Me have multiple scripts logging to syslog, and would like swatch to throttle duplicate messages. To identify duplicate messages, I would like swatch to combine for example field 1, 3 and 4 instead of matching the whole string.

I'm sure swatch can be configured to support this, but currenlty I'm stuck. Any help is appreciated.


PS. I posted the same question on the swatch forum, but posted here too since I didn't get any replies.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Multiple definition of" and "undefined reference to" in QT Creator with QJson lib echelon89 Programming 1 05-01-2009 07:48 AM
"CPU temperature above threshold" readings are wrong i think akudewan Linux - Hardware 18 04-08-2009 09:40 PM
KPPP "Query Modem" returns empty fields ananya Linux - Hardware 2 02-21-2005 11:50 PM
KPPP "Query Modem" returns empty fields ananya Linux - Software 1 02-21-2005 11:39 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration