summaryrefslogtreecommitdiffstats
path: root/extras/gluster-rsyslog-7.2.conf
diff options
context:
space:
mode:
Diffstat (limited to 'extras/gluster-rsyslog-7.2.conf')
-rw-r--r--extras/gluster-rsyslog-7.2.conf34
1 files changed, 34 insertions, 0 deletions
diff --git a/extras/gluster-rsyslog-7.2.conf b/extras/gluster-rsyslog-7.2.conf
index 744acbc9e..8b2841543 100644
--- a/extras/gluster-rsyslog-7.2.conf
+++ b/extras/gluster-rsyslog-7.2.conf
@@ -1,9 +1,28 @@
##### gluster.conf #####
+#
+## If you want to log every message to the log file instead of
+## intelligently suppressing repeated messages, set off to
+## RepeatedMsgReduction. This change requires rsyslog restart
+## (eg. run 'service rsyslog restart')
+#
+#$RepeatedMsgReduction off
$RepeatedMsgReduction on
$ModLoad mmjsonparse
*.* :mmjsonparse:
+#
+## The mmcount 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'
+##
+## More info at http://www.rsyslog.com/doc/mmcount.html
+#
+#module(load="mmcount")
+#action(type="mmcount" appname="glusterd" key="!gf_code") # count each value of gf_code of appname glusterd
+#action(type="mmcount" appname="glusterfsd" key="!gf_code") # count each value of gf_code of appname glusterfsd
+#action(type="mmcount" appname="glusterfs" key="!gf_code") # count each value of gf_code of appname glusterfs
+
template (name="Glusterfsd_dynLogFile" type="string" string="/var/log/glusterfs/bricks/%app-name%.log")
template (name="Gluster_dynLogFile" type="string" string="/var/log/glusterfs/%app-name%.log")
@@ -40,3 +59,18 @@ if $app-name contains 'gluster' then {
Template="GLFS_template")
stop
}
+
+#
+## send email for every 50th mmcount
+#$ModLoad ommail
+#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
+#}
+#