default.conf 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. # ------------------------------------------------------------------------------
  2. # Netdata Logs Management default configuration
  3. # See full explanation on https://github.com/netdata/netdata/blob/master/logsmanagement/README.md
  4. #
  5. # To add a new log source, a new section must be added in this
  6. # file with at least the following settings:
  7. #
  8. # [LOG SOURCE NAME]
  9. # enabled = yes
  10. # log type = flb_tail
  11. #
  12. # For a list of all available log types, see:
  13. # https://github.com/netdata/netdata/blob/master/logsmanagement/README.md#types-of-available-collectors
  14. #
  15. # ------------------------------------------------------------------------------
  16. [kmsg Logs]
  17. ## Example: Log collector that will collect new kernel ring buffer logs
  18. ## Required settings
  19. enabled = yes
  20. log type = flb_kmsg
  21. ## Optional settings, common to all log source.
  22. ## Uncomment to override global equivalents in netdata.conf.
  23. # update every = 1
  24. # update timeout = 10
  25. use log timestamp = no
  26. # circular buffer max size MiB = 64
  27. # circular buffer drop logs if full = no
  28. # compression acceleration = 1
  29. # db mode = none
  30. # circular buffer flush to db = 6
  31. # disk space limit MiB = 500
  32. ## Drop kernel logs with priority higher than prio_level.
  33. # prio level = 8
  34. ## Charts to enable
  35. # collected logs total chart enable = no
  36. # collected logs rate chart enable = yes
  37. severity chart = yes
  38. subsystem chart = yes
  39. device chart = yes
  40. ## Example of capturing specific kmsg events:
  41. # custom 1 chart = USB connect/disconnect
  42. # custom 1 regex name = connect
  43. # custom 1 regex = .*\bNew USB device found\b.*
  44. # custom 2 chart = USB connect/disconnect
  45. # custom 2 regex name = disconnect
  46. # custom 2 regex = .*\bUSB disconnect\b.*
  47. [Systemd Logs]
  48. ## Example: Log collector that will query journald to collect system logs
  49. ## Required settings
  50. enabled = yes
  51. log type = flb_systemd
  52. ## Optional settings, common to all log source.
  53. ## Uncomment to override global equivalents in netdata.conf.
  54. # update every = 1
  55. # update timeout = 10
  56. # use log timestamp = auto
  57. # circular buffer max size MiB = 64
  58. # circular buffer drop logs if full = no
  59. # compression acceleration = 1
  60. # db mode = none
  61. # circular buffer flush to db = 6
  62. # disk space limit MiB = 500
  63. ## Use default path to Systemd Journal
  64. log path = auto
  65. ## Charts to enable
  66. # collected logs total chart enable = no
  67. # collected logs rate chart enable = yes
  68. priority value chart = yes
  69. severity chart = yes
  70. facility chart = yes
  71. [Docker Events Logs]
  72. ## Example: Log collector that will monitor the Docker daemon socket and
  73. ## collect Docker event logs in a default format similar to executing
  74. ## the `sudo docker events` command.
  75. ## Required settings
  76. enabled = yes
  77. log type = flb_docker_events
  78. ## Optional settings, common to all log source.
  79. ## Uncomment to override global equivalents in netdata.conf.
  80. # update every = 1
  81. # update timeout = 10
  82. # use log timestamp = auto
  83. # circular buffer max size MiB = 64
  84. # circular buffer drop logs if full = no
  85. # compression acceleration = 1
  86. # db mode = none
  87. # circular buffer flush to db = 6
  88. # disk space limit MiB = 500
  89. ## Use default Docker socket UNIX path: /var/run/docker.sock
  90. log path = auto
  91. ## Submit structured log entries to the system journal
  92. # submit logs to system journal = no
  93. ## Charts to enable
  94. # collected logs total chart enable = no
  95. # collected logs rate chart enable = yes
  96. event type chart = yes
  97. event action chart = yes
  98. ## Example of how to capture create / attach / die events for a named container:
  99. # custom 1 chart = serverA events
  100. # custom 1 regex name = container create
  101. # custom 1 regex = .*\bcontainer create\b.*\bname=serverA\b.*
  102. # custom 2 chart = serverA events
  103. # custom 2 regex name = container attach
  104. # custom 2 regex = .*\bcontainer attach\b.*\bname=serverA\b.*
  105. # custom 3 chart = serverA events
  106. # custom 3 regex name = container die
  107. # custom 3 regex = .*\bcontainer die\b.*\bname=serverA\b.*
  108. ## Stream to https://cloud.openobserve.ai/
  109. # output 1 name = http
  110. # output 1 URI = YOUR_API_URI
  111. # output 1 Host = api.openobserve.ai
  112. # output 1 Port = 443
  113. # output 1 tls = On
  114. # output 1 Format = json
  115. # output 1 Json_date_key = _timestamp
  116. # output 1 Json_date_format = iso8601
  117. # output 1 HTTP_User = test@netdata.cloud
  118. # output 1 HTTP_Passwd = YOUR_OPENOBSERVE_PASSWORD
  119. # output 1 compress = gzip
  120. ## Real-time export to /tmp/docker_event_logs.csv
  121. # output 2 name = file
  122. # output 2 Path = /tmp
  123. # output 2 File = docker_event_logs.csv
  124. [Apache access.log]
  125. ## Example: Log collector that will tail Apache's access.log file and
  126. ## parse each new record to extract common web server metrics.
  127. ## Required settings
  128. enabled = yes
  129. log type = flb_web_log
  130. ## Optional settings, common to all log source.
  131. ## Uncomment to override global equivalents in netdata.conf.
  132. # update every = 1
  133. # update timeout = 10
  134. # use log timestamp = auto
  135. # circular buffer max size MiB = 64
  136. # circular buffer drop logs if full = no
  137. # compression acceleration = 1
  138. # db mode = none
  139. # circular buffer flush to db = 6
  140. # disk space limit MiB = 500
  141. ## This section supports auto-detection of log file path if section name
  142. ## is left unchanged, otherwise it can be set manually, e.g.:
  143. ## log path = /var/log/apache2/access.log
  144. ## See README for more information on 'log path = auto' option
  145. log path = auto
  146. ## Use inotify instead of file stat watcher. Set to 'no' to reduce CPU usage.
  147. use inotify = yes
  148. ## Auto-detect web log format, otherwise it can be set manually, e.g.:
  149. ## log format = %h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"
  150. ## see https://httpd.apache.org/docs/2.4/logs.html#accesslog
  151. log format = auto
  152. ## Detect errors such as illegal port numbers or response codes.
  153. verify parsed logs = yes
  154. ## Submit structured log entries to the system journal
  155. # submit logs to system journal = no
  156. ## Charts to enable
  157. # collected logs total chart enable = no
  158. # collected logs rate chart enable = yes
  159. vhosts chart = yes
  160. ports chart = yes
  161. IP versions chart = yes
  162. unique client IPs - current poll chart = yes
  163. unique client IPs - all-time chart = no
  164. http request methods chart = yes
  165. http protocol versions chart = yes
  166. bandwidth chart = yes
  167. timings chart = yes
  168. response code families chart = yes
  169. response codes chart = yes
  170. response code types chart = yes
  171. SSL protocols chart = yes
  172. SSL chipher suites chart = yes
  173. [Nginx access.log]
  174. ## Example: Log collector that will tail Nginx's access.log file and
  175. ## parse each new record to extract common web server metrics.
  176. ## Required settings
  177. enabled = yes
  178. log type = flb_web_log
  179. ## Optional settings, common to all log source.
  180. ## Uncomment to override global equivalents in netdata.conf.
  181. # update every = 1
  182. # update timeout = 10
  183. # use log timestamp = auto
  184. # circular buffer max size MiB = 64
  185. # circular buffer drop logs if full = no
  186. # compression acceleration = 1
  187. # db mode = none
  188. # circular buffer flush to db = 6
  189. # disk space limit MiB = 500
  190. ## This section supports auto-detection of log file path if section name
  191. ## is left unchanged, otherwise it can be set manually, e.g.:
  192. ## log path = /var/log/nginx/access.log
  193. ## See README for more information on 'log path = auto' option
  194. log path = auto
  195. ## Use inotify instead of file stat watcher. Set to 'no' to reduce CPU usage.
  196. use inotify = yes
  197. ## see https://docs.nginx.com/nginx/admin-guide/monitoring/logging/#setting-up-the-access-log
  198. log format = $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent $request_length $request_time "$http_referer" "$http_user_agent"
  199. ## Detect errors such as illegal port numbers or response codes.
  200. verify parsed logs = yes
  201. ## Submit structured log entries to the system journal
  202. # submit logs to system journal = no
  203. ## Charts to enable
  204. # collected logs total chart enable = no
  205. # collected logs rate chart enable = yes
  206. vhosts chart = yes
  207. ports chart = yes
  208. IP versions chart = yes
  209. unique client IPs - current poll chart = yes
  210. unique client IPs - all-time chart = no
  211. http request methods chart = yes
  212. http protocol versions chart = yes
  213. bandwidth chart = yes
  214. timings chart = yes
  215. response code families chart = yes
  216. response codes chart = yes
  217. response code types chart = yes
  218. SSL protocols chart = yes
  219. SSL chipher suites chart = yes
  220. [Netdata daemon.log]
  221. ## Example: Log collector that will tail Netdata's daemon.log and
  222. ## it will generate log level charts based on custom regular expressions.
  223. ## Required settings
  224. enabled = yes
  225. log type = flb_tail
  226. ## Optional settings, common to all log source.
  227. ## Uncomment to override global equivalents in netdata.conf.
  228. # update every = 1
  229. # update timeout = 10
  230. # use log timestamp = auto
  231. # circular buffer max size MiB = 64
  232. # circular buffer drop logs if full = no
  233. # compression acceleration = 1
  234. # db mode = none
  235. # circular buffer flush to db = 6
  236. # disk space limit MiB = 500
  237. ## This section supports auto-detection of log file path if section name
  238. ## is left unchanged, otherwise it can be set manually, e.g.:
  239. ## log path = /tmp/netdata/var/log/netdata/daemon.log
  240. ## See README for more information on 'log path = auto' option
  241. log path = auto
  242. ## Use inotify instead of file stat watcher. Set to 'no' to reduce CPU usage.
  243. use inotify = yes
  244. ## Submit structured log entries to the system journal
  245. # submit logs to system journal = no
  246. ## Charts to enable
  247. # collected logs total chart enable = no
  248. # collected logs rate chart enable = yes
  249. ## Examples of extracting custom metrics from Netdata's daemon.log:
  250. ## log level chart
  251. custom 1 chart = log level
  252. custom 1 regex name = emergency
  253. custom 1 regex = level=emergency
  254. custom 1 ignore case = no
  255. custom 2 chart = log level
  256. custom 2 regex name = alert
  257. custom 2 regex = level=alert
  258. custom 2 ignore case = no
  259. custom 3 chart = log level
  260. custom 3 regex name = critical
  261. custom 3 regex = level=critical
  262. custom 3 ignore case = no
  263. custom 4 chart = log level
  264. custom 4 regex name = error
  265. custom 4 regex = level=error
  266. custom 4 ignore case = no
  267. custom 5 chart = log level
  268. custom 5 regex name = warning
  269. custom 5 regex = level=warning
  270. custom 5 ignore case = no
  271. custom 6 chart = log level
  272. custom 6 regex name = notice
  273. custom 6 regex = level=notice
  274. custom 6 ignore case = no
  275. custom 7 chart = log level
  276. custom 7 regex name = info
  277. custom 7 regex = level=info
  278. custom 7 ignore case = no
  279. custom 8 chart = log level
  280. custom 8 regex name = debug
  281. custom 8 regex = level=debug
  282. custom 8 ignore case = no
  283. [Netdata fluentbit.log]
  284. ## Example: Log collector that will tail Netdata's
  285. ## embedded Fluent Bit's logs
  286. ## Required settings
  287. enabled = no
  288. log type = flb_tail
  289. ## Optional settings, common to all log source.
  290. ## Uncomment to override global equivalents in netdata.conf.
  291. # update every = 1
  292. # update timeout = 10
  293. # use log timestamp = auto
  294. # circular buffer max size MiB = 64
  295. # circular buffer drop logs if full = no
  296. # compression acceleration = 1
  297. # db mode = none
  298. # circular buffer flush to db = 6
  299. # disk space limit MiB = 500
  300. ## This section supports auto-detection of log file path if section name
  301. ## is left unchanged, otherwise it can be set manually, e.g.:
  302. ## log path = /tmp/netdata/var/log/netdata/fluentbit.log
  303. ## See README for more information on 'log path = auto' option
  304. log path = auto
  305. ## Use inotify instead of file stat watcher. Set to 'no' to reduce CPU usage.
  306. use inotify = yes
  307. ## Submit structured log entries to the system journal
  308. # submit logs to system journal = no
  309. ## Charts to enable
  310. # collected logs total chart enable = no
  311. # collected logs rate chart enable = yes
  312. ## Examples of extracting custom metrics from fluentbit.log:
  313. ## log level chart
  314. custom 1 chart = log level
  315. custom 1 regex name = error
  316. custom 1 regex = \[error\]
  317. custom 1 ignore case = no
  318. custom 2 chart = log level
  319. custom 2 regex name = warning
  320. custom 2 regex = \[warning\]
  321. custom 2 ignore case = no
  322. custom 3 chart = log level
  323. custom 3 regex name = info
  324. custom 3 regex = \[ info\]
  325. custom 3 ignore case = no
  326. custom 4 chart = log level
  327. custom 4 regex name = debug
  328. custom 4 regex = \[debug\]
  329. custom 4 ignore case = no
  330. custom 5 chart = log level
  331. custom 5 regex name = trace
  332. custom 5 regex = \[trace\]
  333. custom 5 ignore case = no
  334. [auth.log tail]
  335. ## Example: Log collector that will tail auth.log file and count
  336. ## occurences of certain `sudo` commands, using POSIX regular expressions.
  337. ## Required settings
  338. enabled = no
  339. log type = flb_tail
  340. ## Optional settings, common to all log source.
  341. ## Uncomment to override global equivalents in netdata.conf.
  342. # update every = 1
  343. # update timeout = 10
  344. # use log timestamp = auto
  345. # circular buffer max size MiB = 64
  346. # circular buffer drop logs if full = no
  347. # compression acceleration = 1
  348. # db mode = none
  349. # circular buffer flush to db = 6
  350. # disk space limit MiB = 500
  351. ## This section supports auto-detection of log file path if section name
  352. ## is left unchanged, otherwise it can be set manually, e.g.:
  353. ## log path = /var/log/auth.log
  354. ## See README for more information on 'log path = auto' option
  355. log path = auto
  356. ## Use inotify instead of file stat watcher. Set to 'no' to reduce CPU usage.
  357. use inotify = yes
  358. ## Submit structured log entries to the system journal
  359. # submit logs to system journal = no
  360. ## Charts to enable
  361. # collected logs total chart enable = no
  362. # collected logs rate chart enable = yes
  363. ## Examples of extracting custom metrics from auth.log:
  364. # custom 1 chart = failed su
  365. # # custom 1 regex name =
  366. # custom 1 regex = .*\bsu\b.*\bFAILED SU\b.*
  367. # custom 1 ignore case = no
  368. # custom 2 chart = sudo commands
  369. # custom 2 regex name = sudo su
  370. # custom 2 regex = .*\bsudo\b.*\bCOMMAND=/usr/bin/su\b.*
  371. # custom 2 ignore case = yes
  372. # custom 3 chart = sudo commands
  373. # custom 3 regex name = sudo docker run
  374. # custom 3 regex = .*\bsudo\b.*\bCOMMAND=/usr/bin/docker run\b.*
  375. # custom 3 ignore case = yes