glusterfs

Форк
0
/
gluster-rsyslog-7.2.conf 
76 строк · 2.5 Кб
1
##### gluster.conf #####
2
#
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')
7
#
8
#$RepeatedMsgReduction off
9
$RepeatedMsgReduction on
10

11
$ModLoad mmjsonparse
12
*.* :mmjsonparse:
13

14
#
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'
18
##
19
## More info at http://www.rsyslog.com/doc/mmcount.html
20
#
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
25

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")
28

29
template(name="GLFS_template" type="list") {
30
   property(name="$!mmcount")
31
   constant(value="/")
32
   property(name="syslogfacility-text" caseConversion="upper")
33
   constant(value="/")
34
   property(name="syslogseverity-text" caseConversion="upper")
35
   constant(value=" ")
36
   constant(value="[")
37
   property(name="timereported" dateFormat="rfc3339")
38
   constant(value="] ")
39
   constant(value="[")
40
   property(name="$!gf_code")
41
   constant(value="] ")
42
   constant(value="[")
43
   property(name="$!gf_message")
44
   constant(value="] ")
45
   property(name="$!msg")
46
   constant(value="\n")
47
}
48

49
if $app-name contains 'glusterfsd' then {
50
   action(type="omfile"
51
          DynaFile="Glusterfsd_dynLogFile"
52
          Template="GLFS_template")
53
   stop
54
}
55

56
if $app-name contains 'gluster' then {
57
   action(type="omfile"
58
          DynaFile="Gluster_dynLogFile"
59
          Template="GLFS_template")
60
   stop
61
}
62

63
#
64
## send email for every 50th mmcount
65
#$ModLoad ommail
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
75
#}
76
#
77

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.