summaryrefslogtreecommitdiffstats
path: root/action.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-08-07 16:52:31 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-08-07 16:52:31 +0200
commit1480263b026984a3d48a7f750a78911777464797 (patch)
tree1dcbd1c29dded6d1ae646615d165afe430861ea0 /action.h
parent0a7f964436af73f2e7fbd403b563f8d5a743f4a5 (diff)
downloadrsyslog-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.h4
1 files changed, 4 insertions, 0 deletions
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 */