example_syslog.conf 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. [syslog tail]
  2. ## Example: Log collector that will tail the syslog file and count
  3. ## occurences of certain keywords, using POSIX regular expressions.
  4. ## Required settings
  5. enabled = no
  6. log type = flb_tail
  7. ## Optional settings, common to all log source.
  8. ## Uncomment to override global equivalents in netdata.conf.
  9. # update every = 1
  10. # update timeout = 10
  11. # use log timestamp = auto
  12. # circular buffer max size MiB = 64
  13. # circular buffer drop logs if full = no
  14. # compression acceleration = 1
  15. # db mode = none
  16. # circular buffer flush to db = 6
  17. # disk space limit MiB = 500
  18. ## This section supports auto-detection of log file path if section name
  19. ## is left unchanged, otherwise it can be set manually, e.g.:
  20. ## log path = /var/log/syslog
  21. ## log path = /var/log/messages
  22. ## See README for more information on 'log path = auto' option
  23. log path = auto
  24. ## Use inotify instead of file stat watcher. Set to 'no' to reduce CPU usage.
  25. use inotify = yes
  26. ## Submit structured log entries to the system journal
  27. # submit logs to system journal = no
  28. ## Charts to enable
  29. # collected logs total chart enable = no
  30. # collected logs rate chart enable = yes
  31. ## Examples of extracting custom metrics from syslog:
  32. # custom 1 chart = identifier
  33. # custom 1 regex name = kernel
  34. # custom 1 regex = .*\bkernel\b.*
  35. # custom 1 ignore case = no
  36. # custom 2 chart = identifier
  37. # custom 2 regex name = systemd
  38. # custom 2 regex = .*\bsystemd\b.*
  39. # custom 2 ignore case = no
  40. # custom 3 chart = identifier
  41. # custom 3 regex name = CRON
  42. # custom 3 regex = .*\bCRON\b.*
  43. # custom 3 ignore case = no
  44. # custom 3 chart = identifier
  45. # custom 3 regex name = netdata
  46. # custom 3 regex = .*\netdata\b.*
  47. # custom 3 ignore case = no
  48. [syslog Unix socket]
  49. ## Example: Log collector that will listen for RFC-3164 syslog on a UNIX
  50. ## socket that will be created on /tmp/netdata-syslog.sock .
  51. ## Required settings
  52. enabled = no
  53. log type = flb_syslog
  54. ## Optional settings, common to all log source.
  55. ## Uncomment to override global equivalents in netdata.conf.
  56. # update every = 1
  57. # update timeout = 10
  58. # use log timestamp = auto
  59. # circular buffer max size MiB = 64
  60. # circular buffer drop logs if full = no
  61. # compression acceleration = 1
  62. # db mode = none
  63. # circular buffer flush to db = 6
  64. # disk space limit MiB = 500
  65. ## Netdata will create this socket if mode == unix_tcp or mode == unix_udp,
  66. ## please ensure the right permissions exist for this path
  67. log path = /tmp/netdata-syslog.sock
  68. ## Ruby Regular Expression to define expected syslog format
  69. ## Please make sure <PRIVAL>, <SYSLOG_TIMESTAMP>, <HOSTNAME>, <SYSLOG_IDENTIFIER>, <PID> and <MESSAGE> are defined
  70. ## see also https://docs.fluentbit.io/manual/pipeline/parsers/regular-expression
  71. log format = /^\<(?<PRIVAL>[0-9]+)\>(?<SYSLOG_TIMESTAMP>[^ ]* {1,2}[^ ]* [^ ]* )(?<HOSTNAME>[^ ]*) (?<SYSLOG_IDENTIFIER>[a-zA-Z0-9_\/\.\-]*)(?:\[(?<PID>[0-9]+)\])?(?:[^\:]*\:)? *(?<MESSAGE>.*)$/
  72. ## Set up configuration specific to flb_syslog
  73. ## see also https://docs.fluentbit.io/manual/pipeline/inputs/syslog#configuration-parameters
  74. ## Modes supported are: unix_tcp, unix_udp, tcp, udp
  75. mode = unix_udp
  76. # listen = 0.0.0.0
  77. # port = 5140
  78. unix_perm = 0666
  79. ## Charts to enable
  80. # collected logs total chart enable = no
  81. # collected logs rate chart enable = yes
  82. priority value chart = yes
  83. severity chart = yes
  84. facility chart = yes
  85. [syslog TCP socket]
  86. ## Example: Log collector that will listen for RFC-3164 syslog,
  87. ## incoming via TCP on localhost IP and port 5140.
  88. ## Required settings
  89. enabled = no
  90. log type = flb_syslog
  91. ## Optional settings, common to all log source.
  92. ## Uncomment to override global equivalents in netdata.conf.
  93. # update every = 1
  94. # update timeout = 10
  95. # use log timestamp = auto
  96. # circular buffer max size MiB = 64
  97. # circular buffer drop logs if full = no
  98. # compression acceleration = 1
  99. # db mode = none
  100. # circular buffer flush to db = 6
  101. # disk space limit MiB = 500
  102. ## Netdata will create this socket if mode == unix_tcp or mode == unix_udp,
  103. ## please ensure the right permissions exist for this path
  104. # log path = /tmp/netdata-syslog.sock
  105. ## Ruby Regular Expression to define expected syslog format
  106. ## Please make sure <PRIVAL>, <SYSLOG_TIMESTAMP>, <HOSTNAME>, <SYSLOG_IDENTIFIER>, <PID> and <MESSAGE> are defined
  107. ## see also https://docs.fluentbit.io/manual/pipeline/parsers/regular-expression
  108. log format = /^\<(?<PRIVAL>[0-9]+)\>(?<SYSLOG_TIMESTAMP>[^ ]* {1,2}[^ ]* [^ ]* )(?<HOSTNAME>[^ ]*) (?<SYSLOG_IDENTIFIER>[a-zA-Z0-9_\/\.\-]*)(?:\[(?<PID>[0-9]+)\])?(?:[^\:]*\:)? *(?<MESSAGE>.*)$/
  109. ## Set up configuration specific to flb_syslog
  110. ## see also https://docs.fluentbit.io/manual/pipeline/inputs/syslog#configuration-parameters
  111. ## Modes supported are: unix_tcp, unix_udp, tcp, udp
  112. mode = tcp
  113. listen = 0.0.0.0
  114. port = 5140
  115. # unix_perm = 0666
  116. ## Charts to enable
  117. # collected logs total chart enable = no
  118. # collected logs rate chart enable = yes
  119. priority value chart = yes
  120. severity chart = yes
  121. facility chart = yes