From 1480263b026984a3d48a7f750a78911777464797 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 7 Aug 2008 16:52:31 +0200 Subject: added ability to execute actions only after the n-th call of the action This also lead to the addition of two new config directives: $ActionExecOnlyEveryNthTime and $ActionExecOnlyEveryNthTimeTimeout This feature is useful, for example, for alerting: it permits you to send an alert only after at least n occurences of a specific message have been seen by rsyslogd. This protectes against false positives due to waiting for additional confirmation. --- action.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'action.h') diff --git a/action.h b/action.h index 99108aab..c910fc1c 100644 --- a/action.h +++ b/action.h @@ -49,6 +49,10 @@ struct action_s { int iResumeInterval;/* resume interval for this action */ int iResumeRetryCount;/* how often shall we retry a suspended action? (-1 --> eternal) */ int iNbrResRtry; /* number of retries since last suspend */ + int iNbrNoExec; /* number of matches that did not yet yield to an exec */ + int iExecEveryNthOccur;/* execute this action only every n-th occurence (with n=0,1 -> always) */ + int iExecEveryNthOccurTO;/* timeout for n-th occurence feature */ + time_t tLastOccur; /* time last occurence was seen (for timing them out) */ struct modInfo_s *pMod;/* pointer to output module handling this selector */ void *pModData; /* pointer to module data - content is module-specific */ int f_ReduceRepeated;/* reduce repeated lines 0 - no, 1 - yes */ -- cgit