summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorBala.FA <barumuga@redhat.com>2013-05-02 12:51:27 +0530
committerRainer Gerhards <rgerhards@adiscon.com>2013-06-09 18:11:14 +0200
commit2eb19f15a4e59f5bf34200f15a12be9d4ff8608f (patch)
tree89e31883715528a6199a8499d9aa507a563fa9c0 /configure.ac
parent20067e7fbcf72a49bf08c0f55b4151a7c619c03e (diff)
downloadrsyslog-2eb19f15a4e59f5bf34200f15a12be9d4ff8608f.tar.gz
rsyslog-2eb19f15a4e59f5bf34200f15a12be9d4ff8608f.tar.bz2
rsyslog-2eb19f15a4e59f5bf34200f15a12be9d4ff8608f.zip
mmcount: message modification plugin which counts messages
This module provides the capability to count log messages by severity or json property of given app-name. The count value is added into the log message as json property named 'mmcount' Example usage of the module in the configuration file module(load="mmcount") # count each severity of appname gluster action(type="mmcount" appname="gluster") # count each value of gf_code of appname gluster action(type="mmcount" appname="glusterd" key="!gf_code") # count value 9999 of gf_code of appname gluster action(type="mmcount" appname="glusterfsd" key="!gf_code" value="9999") # send email for every 50th mmcount if $app-name == 'glusterfsd' and $!mmcount <> 0 and $!mmcount % 50 == 0 then { $ActionMailSMTPServer smtp.example.com $ActionMailFrom rsyslog@example.com $ActionMailTo glusteradmin@example.com $template mailSubject,"50th message of gf_code=9999 on %hostname%" $template mailBody,"RSYSLOG Alert\r\nmsg='%msg%'" $ActionMailSubject mailSubject $ActionExecOnlyOnceEveryInterval 30 :ommail:;RSYSLOG_SyslogProtocol23Format } Signed-off-by: Bala.FA <barumuga@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 7c05d109..bb77a58c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -962,6 +962,19 @@ AC_ARG_ENABLE(mmanon,
AM_CONDITIONAL(ENABLE_MMANON, test x$enable_mmanon = xyes)
+# mmcount
+AC_ARG_ENABLE(mmcount,
+ [AS_HELP_STRING([--enable-mmcount],[Enable message counting @<:@default=no@:>@])],
+ [case "${enableval}" in
+ yes) enable_xmpp="yes" ;;
+ no) enable_xmpp="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-mmcount) ;;
+ esac],
+ [enable_mmcount=no]
+)
+AM_CONDITIONAL(ENABLE_MMCOUNT, test x$enable_mmcount = xyes)
+
+
# RELP support
AC_ARG_ENABLE(relp,
[AS_HELP_STRING([--enable-relp],[Enable RELP support @<:@default=no@:>@])],
@@ -1478,6 +1491,7 @@ AC_CONFIG_FILES([Makefile \
plugins/mmjsonparse/Makefile \
plugins/mmaudit/Makefile \
plugins/mmanon/Makefile \
+ plugins/mmcount/Makefile \
plugins/omelasticsearch/Makefile \
plugins/sm_cust_bindcdr/Makefile \
plugins/mmsnmptrapd/Makefile \
@@ -1501,6 +1515,7 @@ echo " uuid support enabled: $enable_uuid"
echo " Log file signing support: $enable_guardtime"
echo " Log file encryption support: $enable_libgcrypt"
echo " anonymization support enabled: $enable_mmanon"
+echo " message counting support enabled: $enable_mmcount"
echo
echo "---{ input plugins }---"
echo " Klog functionality enabled: $enable_klog ($os_type)"