-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrsyslog.d
172 lines (63 loc) · 2.63 KB
/
rsyslog.d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
While making syslog input configuration make sure that $InputFileStateFile is unique , otherwise logger will not work,
Refer below examples , for 3 different files we have 3 state files.
$InputFileStateFile state-10-tomcat-tsnwdsscatalin_debug
$InputFileStateFile state-10-tomcat-consoleabcd_debug
$InputFileStateFile state-10-tomcat-consoleauth_debug
Snw Server: source for logs
root@SNWAPPUBPEPROD01:~# cat /opt/rsyslogbackup/rsyslog.conf
$ModLoad imuxsock # provides support for local system logging
$ModLoad imklog # provides kernel logging support
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
$RepeatedMsgReduction on
$FileOwner syslog
$FileGroup adm
$FileCreateMode 0640
$DirCreateMode 0755
$Umask 0022
$PrivDropToUser syslog
$PrivDropToGroup syslog
$WorkDirectory /var/spool/rsyslog
$IncludeConfig /etc/rsyslog.d/*.conf
*.* @@10.135.63.208:10514 ### this is for tcp connection , for udp *.* @10.135.60.35:514;RemoteLog,open iptables & ACCESS & SECURITY rules in horizon
cat /opt/rsyslogbackup/20-tomcatlogs.conf_orig_4mar2015
$ModLoad imfile
$InputFileName /var/log/tomcatsnwdsscatalina.log
$InputFileTag 10.15.81.210.snw-dss-catalina
$InputFileStateFile state-10-tomcat-tsnwdsscatalin_debug
$InputFileSeverity INFO
$InputFileFacility LOCAL6
$InputFilePollInterval 10
$InputRunFileMonitor
$InputFileName /usrdata/logs/tomcatlogs/snw-dss-catalina.log
$InputFileTag 10.15.81.210.snw-dss-catalina
$InputFileStateFile state-10-tomcat-consoleabcd_debug
$InputFileSeverity INFO
$InputFileFacility LOCAL6
$InputFilePollInterval 10
$InputRunFileMonitor
$InputFileName /usrdata/logs/tomcatlogs/localhost_access_log.2015-03-04.logs
$InputFileTag 10.15.81.210.localhost_access_log
$InputFileStateFile state-10-tomcat-consoleauth_debug
$InputFileSeverity INFO
$InputFileFacility LOCAL6
$InputFilePollInterval 10
$InputRunFileMonitor
####################################################################################################################
zabbix server ### syslog server,
root@zabbix-server:/opt/rsyslogbackup# cat rsyslog.conf
$ModLoad imuxsock # provides support for local system logging
$ModLoad imklog # provides kernel logging support
$ModLoad imtcp
$InputTCPServerRun 10514
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
$template FILENAME,"/var/log/%fromhost-ip%/auth.log.log"
*.* ?FILENAME
$FileOwner syslog
$FileGroup adm
$FileCreateMode 0640
$DirCreateMode 0755
$Umask 0022
$PrivDropToUser syslog
$PrivDropToGroup syslog
$WorkDirectory /var/spool/rsyslog
$IncludeConfig /etc/rsyslog.d/*.conf