diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-08-07 16:52:31 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-08-07 16:52:31 +0200 |
commit | 1480263b026984a3d48a7f750a78911777464797 (patch) | |
tree | 1dcbd1c29dded6d1ae646615d165afe430861ea0 /action.h | |
parent | 0a7f964436af73f2e7fbd403b563f8d5a743f4a5 (diff) | |
download | rsyslog-1480263b026984a3d48a7f750a78911777464797.tar.gz rsyslog-1480263b026984a3d48a7f750a78911777464797.tar.xz rsyslog-1480263b026984a3d48a7f750a78911777464797.zip |
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.
Diffstat (limited to 'action.h')
-rw-r--r-- | action.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 */ |