graylog.conf 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. # If you are running more than one instances of Graylog server you have to select one of these
  2. # instances as master. The master will perform some periodical tasks that non-masters won't perform.
  3. is_master = true
  4. # The auto-generated node ID will be stored in this file and read after restarts. It is a good idea
  5. # to use an absolute file path here if you are starting Graylog server from init scripts or similar.
  6. node_id_file = /usr/share/graylog/data/config/node-id
  7. root_username = admin
  8. root_timezone = UTC
  9. bin_dir = /usr/share/graylog/bin
  10. data_dir = /usr/share/graylog/data
  11. plugin_dir = /usr/share/graylog/plugin
  12. # List of Elasticsearch hosts Graylog should connect to.
  13. # Need to be specified as a comma-separated list of valid URIs for the http ports of your elasticsearch nodes.
  14. # If one or more of your elasticsearch hosts require authentication, include the credentials in each node URI that
  15. # requires authentication.
  16. # Maximum number of retries to connect to elasticsearch on boot for the version probe.
  17. #
  18. # Default: 0, retry indefinitely with the given delay until a connection could be established
  19. elasticsearch_version_probe_attempts = 5
  20. # Waiting time in between connection attempts for elasticsearch_version_probe_attempts
  21. #
  22. # Default: 5s
  23. elasticsearch_version_probe_delay = 5s
  24. # Maximum amount of time to wait for successful connection to Elasticsearch HTTP port.
  25. #
  26. # Default: 10 Seconds
  27. elasticsearch_connect_timeout = 10s
  28. # Maximum amount of time to wait for reading back a response from an Elasticsearch server.
  29. # (e. g. during search, index creation, or index time-range calculations)
  30. #
  31. # Default: 60 seconds
  32. elasticsearch_socket_timeout = 60s
  33. # Maximum idle time for an Elasticsearch connection. If this is exceeded, this connection will
  34. # be tore down.
  35. #
  36. # Default: inf
  37. #elasticsearch_idle_timeout = -1s
  38. # Maximum number of total connections to Elasticsearch.
  39. #
  40. # Default: 200
  41. #elasticsearch_max_total_connections = 200
  42. # Maximum number of total connections per Elasticsearch route (normally this means per
  43. # elasticsearch server).
  44. #
  45. # Default: 20
  46. #elasticsearch_max_total_connections_per_route = 20
  47. # Maximum number of times Graylog will retry failed requests to Elasticsearch.
  48. #
  49. # Default: 2
  50. #elasticsearch_max_retries = 2
  51. # Enable automatic Elasticsearch node discovery through Nodes Info,
  52. # see https://www.elastic.co/guide/en/elasticsearch/reference/5.4/cluster-nodes-info.html
  53. #
  54. # WARNING: Automatic node discovery does not work if Elasticsearch requires authentication, e. g. with Shield.
  55. #
  56. # Default: false
  57. #elasticsearch_discovery_enabled = true
  58. # Filter for including/excluding Elasticsearch nodes in discovery according to their custom attributes,
  59. # see https://www.elastic.co/guide/en/elasticsearch/reference/5.4/cluster.html#cluster-nodes
  60. #
  61. # Default: empty
  62. #elasticsearch_discovery_filter = rack:42
  63. # Frequency of the Elasticsearch node discovery.
  64. #
  65. # Default: 30s
  66. # elasticsearch_discovery_frequency = 30s
  67. # Set the default scheme when connecting to Elasticsearch discovered nodes
  68. #
  69. # Default: http (available options: http, https)
  70. #elasticsearch_discovery_default_scheme = http
  71. # Enable payload compression for Elasticsearch requests.
  72. #
  73. # Default: false
  74. #elasticsearch_compression_enabled = true
  75. # Enable use of "Expect: 100-continue" Header for Elasticsearch index requests.
  76. # If this is disabled, Graylog cannot properly handle HTTP 413 Request Entity Too Large errors.
  77. #
  78. # Default: true
  79. #elasticsearch_use_expect_continue = true
  80. # Graylog will use multiple indices to store documents in. You can configured the strategy it uses to determine
  81. # when to rotate the currently active write index.
  82. # It supports multiple rotation strategies:
  83. # - "count" of messages per index, use elasticsearch_max_docs_per_index below to configure
  84. # - "size" per index, use elasticsearch_max_size_per_index below to configure
  85. # valid values are "count", "size" and "time", default is "count"
  86. #
  87. # ATTENTION: These settings have been moved to the database in 2.0. When you upgrade, make sure to set these
  88. # to your previous 1.x settings so they will be migrated to the database!
  89. # This configuration setting is only used on the first start of Graylog. After that,
  90. # index related settings can be changed in the Graylog web interface on the 'System / Indices' page.
  91. # Also see https://docs.graylog.org/docs/index-model#index-set-configuration
  92. rotation_strategy = count
  93. # (Approximate) maximum number of documents in an Elasticsearch index before a new index
  94. # is being created, also see no_retention and elasticsearch_max_number_of_indices.
  95. # Configure this if you used 'rotation_strategy = count' above.
  96. #
  97. # ATTENTION: These settings have been moved to the database in 2.0. When you upgrade, make sure to set these
  98. # to your previous 1.x settings so they will be migrated to the database!
  99. # This configuration setting is only used on the first start of Graylog. After that,
  100. # index related settings can be changed in the Graylog web interface on the 'System / Indices' page.
  101. # Also see https://docs.graylog.org/docs/index-model#index-set-configuration
  102. elasticsearch_max_docs_per_index = 20000000
  103. # (Approximate) maximum size in bytes per Elasticsearch index on disk before a new index is being created, also see
  104. # no_retention and elasticsearch_max_number_of_indices. Default is 1GB.
  105. # Configure this if you used 'rotation_strategy = size' above.
  106. #
  107. # ATTENTION: These settings have been moved to the database in 2.0. When you upgrade, make sure to set these
  108. # to your previous 1.x settings so they will be migrated to the database!
  109. # This configuration setting is only used on the first start of Graylog. After that,
  110. # index related settings can be changed in the Graylog web interface on the 'System / Indices' page.
  111. # Also see https://docs.graylog.org/docs/index-model#index-set-configuration
  112. #elasticsearch_max_size_per_index = 1073741824
  113. # (Approximate) maximum time before a new Elasticsearch index is being created, also see
  114. # no_retention and elasticsearch_max_number_of_indices. Default is 1 day.
  115. # Configure this if you used 'rotation_strategy = time' above.
  116. # Please note that this rotation period does not look at the time specified in the received messages, but is
  117. # using the real clock value to decide when to rotate the index!
  118. # Specify the time using a duration and a suffix indicating which unit you want:
  119. # 1w = 1 week
  120. # 1d = 1 day
  121. # 12h = 12 hours
  122. # Permitted suffixes are: d for day, h for hour, m for minute, s for second.
  123. #
  124. # ATTENTION: These settings have been moved to the database in 2.0. When you upgrade, make sure to set these
  125. # to your previous 1.x settings so they will be migrated to the database!
  126. # This configuration setting is only used on the first start of Graylog. After that,
  127. # index related settings can be changed in the Graylog web interface on the 'System / Indices' page.
  128. # Also see https://docs.graylog.org/docs/index-model#index-set-configuration
  129. #elasticsearch_max_time_per_index = 1d
  130. # Disable checking the version of Elasticsearch for being compatible with this Graylog release.
  131. # WARNING: Using Graylog with unsupported and untested versions of Elasticsearch may lead to data loss!
  132. #elasticsearch_disable_version_check = true
  133. # Disable message retention on this node, i. e. disable Elasticsearch index rotation.
  134. #no_retention = false
  135. # How many indices do you want to keep?
  136. #
  137. # ATTENTION: These settings have been moved to the database in 2.0. When you upgrade, make sure to set these
  138. # to your previous 1.x settings so they will be migrated to the database!
  139. # This configuration setting is only used on the first start of Graylog. After that,
  140. # index related settings can be changed in the Graylog web interface on the 'System / Indices' page.
  141. # Also see https://docs.graylog.org/docs/index-model#index-set-configuration
  142. elasticsearch_max_number_of_indices = 20
  143. # Decide what happens with the oldest indices when the maximum number of indices is reached.
  144. # The following strategies are availble:
  145. # - delete # Deletes the index completely (Default)
  146. # - close # Closes the index and hides it from the system. Can be re-opened later.
  147. #
  148. # ATTENTION: These settings have been moved to the database in 2.0. When you upgrade, make sure to set these
  149. # to your previous 1.x settings so they will be migrated to the database!
  150. # This configuration setting is only used on the first start of Graylog. After that,
  151. # index related settings can be changed in the Graylog web interface on the 'System / Indices' page.
  152. # Also see https://docs.graylog.org/docs/index-model#index-set-configuration
  153. retention_strategy = delete
  154. # How many Elasticsearch shards and replicas should be used per index? Note that this only applies to newly created indices.
  155. # ATTENTION: These settings have been moved to the database in Graylog 2.2.0. When you upgrade, make sure to set these
  156. # to your previous settings so they will be migrated to the database!
  157. # This configuration setting is only used on the first start of Graylog. After that,
  158. # index related settings can be changed in the Graylog web interface on the 'System / Indices' page.
  159. # Also see https://docs.graylog.org/docs/index-model#index-set-configuration
  160. elasticsearch_shards = 4
  161. elasticsearch_replicas = 0
  162. # Prefix for all Elasticsearch indices and index aliases managed by Graylog.
  163. #
  164. # ATTENTION: These settings have been moved to the database in Graylog 2.2.0. When you upgrade, make sure to set these
  165. # to your previous settings so they will be migrated to the database!
  166. # This configuration setting is only used on the first start of Graylog. After that,
  167. # index related settings can be changed in the Graylog web interface on the 'System / Indices' page.
  168. # Also see https://docs.graylog.org/docs/index-model#index-set-configuration
  169. elasticsearch_index_prefix = graylog
  170. # Name of the Elasticsearch index template used by Graylog to apply the mandatory index mapping.
  171. # Default: graylog-internal
  172. #
  173. # ATTENTION: These settings have been moved to the database in Graylog 2.2.0. When you upgrade, make sure to set these
  174. # to your previous settings so they will be migrated to the database!
  175. # This configuration setting is only used on the first start of Graylog. After that,
  176. # index related settings can be changed in the Graylog web interface on the 'System / Indices' page.
  177. # Also see https://docs.graylog.org/docs/index-model#index-set-configuration
  178. #elasticsearch_template_name = graylog-internal
  179. # Do you want to allow searches with leading wildcards? This can be extremely resource hungry and should only
  180. # be enabled with care. See also: https://docs.graylog.org/docs/query-language
  181. allow_leading_wildcard_searches = false
  182. # Do you want to allow searches to be highlighted? Depending on the size of your messages this can be memory hungry and
  183. # should only be enabled after making sure your Elasticsearch cluster has enough memory.
  184. allow_highlighting = false
  185. # Analyzer (tokenizer) to use for message and full_message field. The "standard" filter usually is a good idea.
  186. # All supported analyzers are: standard, simple, whitespace, stop, keyword, pattern, language, snowball, custom
  187. # Elasticsearch documentation: https://www.elastic.co/guide/en/elasticsearch/reference/2.3/analysis.html
  188. # Note that this setting only takes effect on newly created indices.
  189. #
  190. # ATTENTION: These settings have been moved to the database in Graylog 2.2.0. When you upgrade, make sure to set these
  191. # to your previous settings so they will be migrated to the database!
  192. # This configuration setting is only used on the first start of Graylog. After that,
  193. # index related settings can be changed in the Graylog web interface on the 'System / Indices' page.
  194. # Also see https://docs.graylog.org/docs/index-model#index-set-configuration
  195. elasticsearch_analyzer = standard
  196. # Global timeout for index optimization (force merge) requests.
  197. # Default: 1h
  198. #elasticsearch_index_optimization_timeout = 1h
  199. # Maximum number of concurrently running index optimization (force merge) jobs.
  200. # If you are using lots of different index sets, you might want to increase that number.
  201. # Default: 20
  202. #elasticsearch_index_optimization_jobs = 20
  203. # Mute the logging-output of ES deprecation warnings during REST calls in the ES RestClient
  204. #elasticsearch_mute_deprecation_warnings = true
  205. # Time interval for index range information cleanups. This setting defines how often stale index range information
  206. # is being purged from the database.
  207. # Default: 1h
  208. #index_ranges_cleanup_interval = 1h
  209. # Time interval for the job that runs index field type maintenance tasks like cleaning up stale entries. This doesn't
  210. # need to run very often.
  211. # Default: 1h
  212. #index_field_type_periodical_interval = 1h
  213. # Batch size for the Elasticsearch output. This is the maximum (!) number of messages the Elasticsearch output
  214. # module will get at once and write to Elasticsearch in a batch call. If the configured batch size has not been
  215. # reached within output_flush_interval seconds, everything that is available will be flushed at once. Remember
  216. # that every outputbuffer processor manages its own batch and performs its own batch write calls.
  217. # ("outputbuffer_processors" variable)
  218. output_batch_size = 500
  219. # Flush interval (in seconds) for the Elasticsearch output. This is the maximum amount of time between two
  220. # batches of messages written to Elasticsearch. It is only effective at all if your minimum number of messages
  221. # for this time period is less than output_batch_size * outputbuffer_processors.
  222. output_flush_interval = 1
  223. # As stream outputs are loaded only on demand, an output which is failing to initialize will be tried over and
  224. # over again. To prevent this, the following configuration options define after how many faults an output will
  225. # not be tried again for an also configurable amount of seconds.
  226. output_fault_count_threshold = 5
  227. output_fault_penalty_seconds = 30
  228. # The number of parallel running processors.
  229. # Raise this number if your buffers are filling up.
  230. processbuffer_processors = 5
  231. outputbuffer_processors = 3
  232. # The following settings (outputbuffer_processor_*) configure the thread pools backing each output buffer processor.
  233. # See https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadPoolExecutor.html for technical details
  234. # When the number of threads is greater than the core (see outputbuffer_processor_threads_core_pool_size),
  235. # this is the maximum time in milliseconds that excess idle threads will wait for new tasks before terminating.
  236. # Default: 5000
  237. #outputbuffer_processor_keep_alive_time = 5000
  238. # The number of threads to keep in the pool, even if they are idle, unless allowCoreThreadTimeOut is set
  239. # Default: 3
  240. #outputbuffer_processor_threads_core_pool_size = 3
  241. # The maximum number of threads to allow in the pool
  242. # Default: 30
  243. #outputbuffer_processor_threads_max_pool_size = 30
  244. # UDP receive buffer size for all message inputs (e. g. SyslogUDPInput).
  245. #udp_recvbuffer_sizes = 1048576
  246. # Wait strategy describing how buffer processors wait on a cursor sequence. (default: sleeping)
  247. # Possible types:
  248. # - yielding
  249. # Compromise between performance and CPU usage.
  250. # - sleeping
  251. # Compromise between performance and CPU usage. Latency spikes can occur after quiet periods.
  252. # - blocking
  253. # High throughput, low latency, higher CPU usage.
  254. # - busy_spinning
  255. # Avoids syscalls which could introduce latency jitter. Best when threads can be bound to specific CPU cores.
  256. processor_wait_strategy = blocking
  257. # Size of internal ring buffers. Raise this if raising outputbuffer_processors does not help anymore.
  258. # For optimum performance your LogMessage objects in the ring buffer should fit in your CPU L3 cache.
  259. # Must be a power of 2. (512, 1024, 2048, ...)
  260. ring_size = 65536
  261. inputbuffer_ring_size = 65536
  262. inputbuffer_processors = 2
  263. inputbuffer_wait_strategy = blocking
  264. # Enable the message journal.
  265. message_journal_enabled = true
  266. # The directory which will be used to store the message journal. The directory must be exclusively used by Graylog and
  267. # must not contain any other files than the ones created by Graylog itself.
  268. #
  269. # ATTENTION:
  270. # If you create a seperate partition for the journal files and use a file system creating directories like 'lost+found'
  271. # in the root directory, you need to create a sub directory for your journal.
  272. # Otherwise Graylog will log an error message that the journal is corrupt and Graylog will not start.
  273. message_journal_dir = data/journal
  274. # Journal hold messages before they could be written to Elasticsearch.
  275. # For a maximum of 12 hours or 5 GB whichever happens first.
  276. # During normal operation the journal will be smaller.
  277. #message_journal_max_age = 12h
  278. #message_journal_max_size = 5gb
  279. #message_journal_flush_age = 1m
  280. #message_journal_flush_interval = 1000000
  281. #message_journal_segment_age = 1h
  282. #message_journal_segment_size = 100mb
  283. # Number of threads used exclusively for dispatching internal events. Default is 2.
  284. #async_eventbus_processors = 2
  285. # How many seconds to wait between marking node as DEAD for possible load balancers and starting the actual
  286. # shutdown process. Set to 0 if you have no status checking load balancers in front.
  287. lb_recognition_period_seconds = 3
  288. # MongoDB connection string
  289. # See https://docs.mongodb.com/manual/reference/connection-string/ for details
  290. #mongodb_uri = mongodb://localhost/graylog
  291. mongodb_uri = mongodb://mongodb/graylog
  292. # Authenticate against the MongoDB server
  293. # '+'-signs in the username or password need to be replaced by '%2B'
  294. #mongodb_uri = mongodb://grayloguser:secret@localhost:27017/graylog
  295. # Use a replica set instead of a single host
  296. #mongodb_uri = mongodb://grayloguser:secret@localhost:27017,localhost:27018,localhost:27019/graylog?replicaSet=rs01
  297. # DNS Seedlist https://docs.mongodb.com/manual/reference/connection-string/#dns-seedlist-connection-format
  298. #mongodb_uri = mongodb+srv://server.example.org/graylog
  299. # Increase this value according to the maximum connections your MongoDB server can handle from a single client
  300. # if you encounter MongoDB connection problems.
  301. mongodb_max_connections = 1000
  302. # Number of threads allowed to be blocked by MongoDB connections multiplier. Default: 5
  303. # If mongodb_max_connections is 100, and mongodb_threads_allowed_to_block_multiplier is 5,
  304. # then 500 threads can block. More than that and an exception will be thrown.
  305. # http://api.mongodb.com/java/current/com/mongodb/MongoOptions.html#threadsAllowedToBlockForConnectionMultiplier
  306. mongodb_threads_allowed_to_block_multiplier = 5
  307. # For some cluster-related REST requests, the node must query all other nodes in the cluster. This is the maximum number
  308. # of threads available for this. Increase it, if '/cluster/*' requests take long to complete.
  309. # Should be http_thread_pool_size * average_cluster_size if you have a high number of concurrent users.
  310. proxied_requests_thread_pool_size = 32
  311. # The allowed TLS protocols for system wide TLS enabled servers. (e.g. message inputs, http interface)
  312. # Setting this to an empty value, leaves it up to system libraries and the used JDK to chose a default.
  313. # Default: TLSv1.2,TLSv1.3 (might be automatically adjusted to protocols supported by the JDK)
  314. enabled_tls_protocols= TLSv1.2,TLSv1.3
  315. # Enable Prometheus exporter HTTP server.
  316. # Default: false
  317. prometheus_exporter_enabled = true
  318. # IP address and port for the Prometheus exporter HTTP server.
  319. # Default: 127.0.0.1:9833
  320. prometheus_exporter_bind_address = 127.0.0.1:9833
  321. #Email Settings
  322. transport_email_enabled = true
  323. transport_email_hostname = outbound.mailhop.org
  324. transport_email_port = 587
  325. transport_email_use_auth = true
  326. transport_email_use_tls = true
  327. transport_email_use_ssl = false
  328. transport_email_auth_username = xxxxx
  329. transport_email_auth_password = xxxxxx
  330. transport_email_subject_prefix = [graylog]
  331. transport_email_from_email = graylog@example.com
  332. transport_email_web_interface_url = https://graylog.example.com