summaryrefslogtreecommitdiffstats
path: root/logsmanagement/stock_conf/logsmanagement.d/default.conf
blob: 80ea790c1709f83a2b224d22186eebbd129a3065 (plain)
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
# ------------------------------------------------------------------------------
# Netdata Logs Management default configuration
# See full explanation on https://github.com/netdata/netdata/blob/master/logsmanagement/README.md
#
# To add a new log source, a new section must be added in this 
# file with at least the following settings:
#
# [LOG SOURCE NAME]
# 	enabled = yes
# 	log type = flb_tail
#
# For a list of all available log types, see:
# https://github.com/netdata/netdata/blob/master/logsmanagement/README.md#types-of-available-collectors
#
# ------------------------------------------------------------------------------

[kmsg Logs]
	## Example: Log collector that will collect new kernel ring buffer logs

	## Required settings
	enabled = yes
	log type = flb_kmsg

	## Optional settings, common to all log source. 
	## Uncomment to override global equivalents in netdata.conf.
	# update every = 1
	# update timeout = 10
	use log timestamp = no
	# circular buffer max size MiB = 64
	# circular buffer drop logs if full = no
	# compression acceleration = 1
	# db mode = none
	# circular buffer flush to db = 6
	# disk space limit MiB = 500

	## Drop kernel logs with priority higher than prio_level.
	# prio level = 8

	## Charts to enable
	# collected logs total chart enable = no
	# collected logs rate chart enable = yes
	severity chart = yes
	subsystem chart = yes
	device chart = yes

	## Example of capturing specific kmsg events:
	# custom 1 chart = USB connect/disconnect
	# custom 1 regex name = connect
	# custom 1 regex = .*\bNew USB device found\b.*

	# custom 2 chart = USB connect/disconnect
	# custom 2 regex name = disconnect
	# custom 2 regex = .*\bUSB disconnect\b.*

[Systemd Logs]
	## Example: Log collector that will query journald to collect system logs

	## Required settings
	enabled = yes
	log type = flb_systemd

	## Optional settings, common to all log source. 
	## Uncomment to override global equivalents in netdata.conf.
	# update every = 1
	# update timeout = 10
	# use log timestamp = auto
	# circular buffer max size MiB = 64
	# circular buffer drop logs if full = no
	# compression acceleration = 1
	# db mode = none
	# circular buffer flush to db = 6
	# disk space limit MiB = 500

	## Use default path to Systemd Journal
	log path = auto

	## Charts to enable
	# collected logs total chart enable = no
	# collected logs rate chart enable = yes
	priority value chart = yes
	severity chart = yes
	facility chart = yes

[Docker Events Logs]
	## Example: Log collector that will monitor the Docker daemon socket and
	## collect Docker event logs in a default format similar to executing 
	## the `sudo docker events` command.

	## Required settings
	enabled = yes
	log type = flb_docker_events

	## Optional settings, common to all log source. 
	## Uncomment to override global equivalents in netdata.conf.
	# update every = 1
	# update timeout = 10
	# use log timestamp = auto
	# circular buffer max size MiB = 64
	# circular buffer drop logs if full = no
	# compression acceleration = 1
	# db mode = none
	# circular buffer flush to db = 6
	# disk space limit MiB = 500

	## Use default Docker socket UNIX path: /var/run/docker.sock
	log path = auto

	## Submit structured log entries to the system journal
	# submit logs to system journal = no

	## Charts to enable
	# collected logs total chart enable = no
	# collected logs rate chart enable = yes
	event type chart = yes
	event action chart = yes

	## Example of how to capture create / attach / die events for a named container:
	# custom 1 chart = serverA events
	# custom 1 regex name = container create
	# custom 1 regex = .*\bcontainer create\b.*\bname=serverA\b.*

	# custom 2 chart = serverA events
	# custom 2 regex name = container attach
	# custom 2 regex = .*\bcontainer attach\b.*\bname=serverA\b.*

	# custom 3 chart = serverA events
	# custom 3 regex name = container die
	# custom 3 regex = .*\bcontainer die\b.*\bname=serverA\b.*

	## Stream to https://cloud.openobserve.ai/
	# output 1 name             = http
	# output 1 URI              = YOUR_API_URI
	# output 1 Host             = api.openobserve.ai
	# output 1 Port             = 443
	# output 1 tls              = On
	# output 1 Format           = json
	# output 1 Json_date_key    = _timestamp
	# output 1 Json_date_format = iso8601
	# output 1 HTTP_User        = test@netdata.cloud
	# output 1 HTTP_Passwd      = YOUR_OPENOBSERVE_PASSWORD
	# output 1 compress         = gzip

	## Real-time export to /tmp/docker_event_logs.csv
	# output 2 name             = file
	# output 2 Path             = /tmp
	# output 2 File             = docker_event_logs.csv

[Apache access.log]
	## Example: Log collector that will tail Apache's access.log file and 
	## parse each new record to extract common web server metrics.

	## Required settings
	enabled = yes
	log type = flb_web_log

	## Optional settings, common to all log source. 
	## Uncomment to override global equivalents in netdata.conf.
	# update every = 1
	# update timeout = 10
	# use log timestamp = auto
	# circular buffer max size MiB = 64
	# circular buffer drop logs if full = no
	# compression acceleration = 1
	# db mode = none
	# circular buffer flush to db = 6
	# disk space limit MiB = 500

	## This section supports auto-detection of log file path if section name
	## is left unchanged, otherwise it can be set manually, e.g.:
	## log path = /var/log/apache2/access.log
	## See README for more information on 'log path = auto' option
	log path = auto

	## Use inotify instead of file stat watcher. Set to 'no' to reduce CPU usage.
	use inotify = yes
	
	## Auto-detect web log format, otherwise it can be set manually, e.g.:
	## log format = %h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"
	## see https://httpd.apache.org/docs/2.4/logs.html#accesslog
	log format = auto

	## Detect errors such as illegal port numbers or response codes.
	verify parsed logs = yes

	## Submit structured log entries to the system journal
	# submit logs to system journal = no

	## Charts to enable
	# collected logs total chart enable = no
	# collected logs rate chart enable = yes
	vhosts chart = yes
	ports chart = yes
	IP versions chart = yes
	unique client IPs - current poll chart = yes
	unique client IPs - all-time chart = no
	http request methods chart = yes
	http protocol versions chart = yes
	bandwidth chart = yes
	timings chart = yes
	response code families chart = yes
	response codes chart = yes
	response code types chart = yes
	SSL protocols chart = yes
	SSL chipher suites chart = yes

[Nginx access.log]
	## Example: Log collector that will tail Nginx's access.log file and 
	## parse each new record to extract common web server metrics.

	## Required settings
	enabled = yes
	log type = flb_web_log

	## Optional settings, common to all log source. 
	## Uncomment to override global equivalents in netdata.conf.
	# update every = 1
	# update timeout = 10
	# use log timestamp = auto
	# circular buffer max size MiB = 64
	# circular buffer drop logs if full = no
	# compression acceleration = 1
	# db mode = none
	# circular buffer flush to db = 6
	# disk space limit MiB = 500

	## This section supports auto-detection of log file path if section name
	## is left unchanged, otherwise it can be set manually, e.g.:
	## log path = /var/log/nginx/access.log
	## See README for more information on 'log path = auto' option
	log path = auto

	## Use inotify instead of file stat watcher. Set to 'no' to reduce CPU usage.
	use inotify = yes

	## see https://docs.nginx.com/nginx/admin-guide/monitoring/logging/#setting-up-the-access-log
	log format = $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent $request_length $request_time "$http_referer" "$http_user_agent"
	
	## Detect errors such as illegal port numbers or response codes.
	verify parsed logs = yes

	## Submit structured log entries to the system journal
	# submit logs to system journal = no

	## Charts to enable
	# collected logs total chart enable = no
	# collected logs rate chart enable = yes
	vhosts chart = yes
	ports chart = yes
	IP versions chart = yes
	unique client IPs - current poll chart = yes
	unique client IPs - all-time chart = no
	http request methods chart = yes
	http protocol versions chart = yes
	bandwidth chart = yes
	timings chart = yes
	response code families chart = yes
	response codes chart = yes
	response code types chart = yes
	SSL protocols chart = yes
	SSL chipher suites chart = yes

[Netdata daemon.log]
	## Example: Log collector that will tail Netdata's daemon.log and 
	## it will generate log level charts based on custom regular expressions.

	## Required settings
	enabled = yes
	log type = flb_tail

	## Optional settings, common to all log source. 
	## Uncomment to override global equivalents in netdata.conf.
	# update every = 1
	# update timeout = 10
	# use log timestamp = auto
	# circular buffer max size MiB = 64
	# circular buffer drop logs if full = no
	# compression acceleration = 1
	# db mode = none
	# circular buffer flush to db = 6
	# disk space limit MiB = 500

	## This section supports auto-detection of log file path if section name
	## is left unchanged, otherwise it can be set manually, e.g.:
	## log path = /tmp/netdata/var/log/netdata/daemon.log
	## See README for more information on 'log path = auto' option
	log path = auto

	## Use inotify instead of file stat watcher. Set to 'no' to reduce CPU usage.
	use inotify = yes

	## Submit structured log entries to the system journal
	# submit logs to system journal = no

	## Charts to enable
	# collected logs total chart enable = no
	# collected logs rate chart enable = yes
	
	## Examples of extracting custom metrics from Netdata's daemon.log:

	## log level chart
	custom 1 chart = log level
	custom 1 regex name = emergency
	custom 1 regex = level=emergency
	custom 1 ignore case = no

	custom 2 chart = log level
	custom 2 regex name = alert
	custom 2 regex = level=alert
	custom 2 ignore case = no

	custom 3 chart = log level
	custom 3 regex name = critical
	custom 3 regex = level=critical
	custom 3 ignore case = no

	custom 4 chart = log level
	custom 4 regex name = error
	custom 4 regex = level=error
	custom 4 ignore case = no

	custom 5 chart = log level
	custom 5 regex name = warning
	custom 5 regex = level=warning
	custom 5 ignore case = no

	custom 6 chart = log level
	custom 6 regex name = notice
	custom 6 regex = level=notice
	custom 6 ignore case = no

	custom 7 chart = log level
	custom 7 regex name = info
	custom 7 regex = level=info
	custom 7 ignore case = no

	custom 8 chart = log level
	custom 8 regex name = debug
	custom 8 regex = level=debug
	custom 8 ignore case = no

[Netdata fluentbit.log]
	## Example: Log collector that will tail Netdata's 
	## embedded Fluent Bit's logs

	## Required settings
	enabled = no
	log type = flb_tail

	## Optional settings, common to all log source. 
	## Uncomment to override global equivalents in netdata.conf.
	# update every = 1
	# update timeout = 10
	# use log timestamp = auto
	# circular buffer max size MiB = 64
	# circular buffer drop logs if full = no
	# compression acceleration = 1
	# db mode = none
	# circular buffer flush to db = 6
	# disk space limit MiB = 500

	## This section supports auto-detection of log file path if section name
	## is left unchanged, otherwise it can be set manually, e.g.:
	## log path = /tmp/netdata/var/log/netdata/fluentbit.log
	## See README for more information on 'log path = auto' option
	log path = auto

	## Use inotify instead of file stat watcher. Set to 'no' to reduce CPU usage.
	use inotify = yes

	## Submit structured log entries to the system journal
	# submit logs to system journal = no

	## Charts to enable
	# collected logs total chart enable = no
	# collected logs rate chart enable = yes
	
	## Examples of extracting custom metrics from fluentbit.log:

	## log level chart
	custom 1 chart = log level
	custom 1 regex name = error
	custom 1 regex = \[error\]
	custom 1 ignore case = no

	custom 2 chart = log level
	custom 2 regex name = warning
	custom 2 regex = \[warning\]
	custom 2 ignore case = no

	custom 3 chart = log level
	custom 3 regex name = info
	custom 3 regex = \[ info\]
	custom 3 ignore case = no

	custom 4 chart = log level
	custom 4 regex name = debug
	custom 4 regex = \[debug\]
	custom 4 ignore case = no

	custom 5 chart = log level
	custom 5 regex name = trace
	custom 5 regex = \[trace\]
	custom 5 ignore case = no

[auth.log tail]
	## Example: Log collector that will tail auth.log file and count 
	## occurences of certain `sudo` commands, using POSIX regular expressions.

	## Required settings
	enabled = no
	log type = flb_tail

	## Optional settings, common to all log source. 
	## Uncomment to override global equivalents in netdata.conf.
	# update every = 1
	# update timeout = 10
	# use log timestamp = auto
	# circular buffer max size MiB = 64
	# circular buffer drop logs if full = no
	# compression acceleration = 1
	# db mode = none
	# circular buffer flush to db = 6
	# disk space limit MiB = 500

	## This section supports auto-detection of log file path if section name
	## is left unchanged, otherwise it can be set manually, e.g.:
	## log path = /var/log/auth.log
	## See README for more information on 'log path = auto' option
	log path = auto

	## Use inotify instead of file stat watcher. Set to 'no' to reduce CPU usage.
	use inotify = yes

	## Submit structured log entries to the system journal
	# submit logs to system journal = no

	## Charts to enable
	# collected logs total chart enable = no
	# collected logs rate chart enable = yes
	
	## Examples of extracting custom metrics from auth.log:
	# custom 1 chart = failed su
	# # custom 1 regex name = 
	# custom 1 regex = .*\bsu\b.*\bFAILED SU\b.*
	# custom 1 ignore case = no

	# custom 2 chart = sudo commands
	# custom 2 regex name = sudo su
	# custom 2 regex = .*\bsudo\b.*\bCOMMAND=/usr/bin/su\b.*
	# custom 2 ignore case = yes

	# custom 3 chart = sudo commands
	# custom 3 regex name = sudo docker run
	# custom 3 regex = .*\bsudo\b.*\bCOMMAND=/usr/bin/docker run\b.*
	# custom 3 ignore case = yes