1
##### gluster.conf #####
3
## If you want to log every message to the log file instead of
4
## intelligently suppressing repeated messages, set off to
5
## RepeatedMsgReduction. This change requires rsyslog restart
6
## (eg. run 'service rsyslog restart')
8
#$RepeatedMsgReduction off
9
$RepeatedMsgReduction on
15
## The mmcount module provides the capability to count log messages by
16
## severity or json property of given app-name. The count value is added
17
## into the log message as json property named 'mmcount'
19
## More info at http://www.rsyslog.com/doc/mmcount.html
21
#module(load="mmcount")
22
#action(type="mmcount" appname="glusterd" key="!gf_code") # count each value of gf_code of appname glusterd
23
#action(type="mmcount" appname="glusterfsd" key="!gf_code") # count each value of gf_code of appname glusterfsd
24
#action(type="mmcount" appname="glusterfs" key="!gf_code") # count each value of gf_code of appname glusterfs
26
template (name="Glusterfsd_dynLogFile" type="string" string="/var/log/glusterfs/bricks/%app-name%.log")
27
template (name="Gluster_dynLogFile" type="string" string="/var/log/glusterfs/%app-name%.log")
29
template(name="GLFS_template" type="list") {
30
property(name="$!mmcount")
32
property(name="syslogfacility-text" caseConversion="upper")
34
property(name="syslogseverity-text" caseConversion="upper")
37
property(name="timereported" dateFormat="rfc3339")
40
property(name="$!gf_code")
43
property(name="$!gf_message")
45
property(name="$!msg")
49
if $app-name contains 'glusterfsd' then {
51
DynaFile="Glusterfsd_dynLogFile"
52
Template="GLFS_template")
56
if $app-name contains 'gluster' then {
58
DynaFile="Gluster_dynLogFile"
59
Template="GLFS_template")
64
## send email for every 50th mmcount
66
#if $app-name == 'glusterfsd' and $!mmcount <> 0 and $!mmcount % 50 == 0 then {
67
# $ActionMailSMTPServer smtp.example.com
68
# $ActionMailFrom rsyslog@example.com
69
# $ActionMailTo glusteradmin@example.com
70
# $template mailSubject,"50th message of gf_code=9999 on %hostname%"
71
# $template mailBody,"RSYSLOG Alert\r\nmsg='%msg%'"
72
# $ActionMailSubject mailSubject
73
# $ActionExecOnlyOnceEveryInterval 30
74
# :ommail:;RSYSLOG_SyslogProtocol23Format