From 91b736b1f04061ba516d159ae01a943a01706d9c Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Sun, 9 Jun 2013 18:18:47 +0200 Subject: add minimal doc for contributed mmcount module --- doc/mmcount.html | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 doc/mmcount.html (limited to 'doc/mmcount.html') diff --git a/doc/mmcount.html b/doc/mmcount.html new file mode 100644 index 00000000..1d06340d --- /dev/null +++ b/doc/mmcount.html @@ -0,0 +1,58 @@ + + + +mmcount + + +back + +

mmcount

+

Module Name:    mmcount

+

Author: Bala.FA <barumuga@redhat.com>

+

Status: Non project-supported module - contact author +or rsyslog mailing list for questions +

Available since: 7.5.0

+

Description:

+

+

+    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
+     }
+
+ +

[rsyslog.conf overview] [manual +index] [rsyslog site]

+

This documentation is part of the +rsyslog project.
+Copyright © 2008-2013 by Rainer Gerhards and +Adiscon. Released under the GNU GPL +version 3 or higher.

+ + -- cgit v1.2.3