graylog.conf 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. ############################
  2. # GRAYLOG CONFIGURATION FILE
  3. ############################
  4. #
  5. # This is the Graylog configuration file. The file has to use ISO 8859-1/Latin-1 character encoding.
  6. # Characters that cannot be directly represented in this encoding can be written using Unicode escapes
  7. # as defined in https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.3, using the \u prefix.
  8. # For example, \u002c.
  9. #
  10. # * Entries are generally expected to be a single line of the form, one of the following:
  11. #
  12. # propertyName=propertyValue
  13. # propertyName:propertyValue
  14. #
  15. # * White space that appears between the property name and property value is ignored,
  16. # so the following are equivalent:
  17. #
  18. # name=Stephen
  19. # name = Stephen
  20. #
  21. # * White space at the beginning of the line is also ignored.
  22. #
  23. # * Lines that start with the comment characters ! or # are ignored. Blank lines are also ignored.
  24. #
  25. # * The property value is generally terminated by the end of the line. White space following the
  26. # property value is not ignored, and is treated as part of the property value.
  27. #
  28. # * A property value can span several lines if each line is terminated by a backslash (‘\’) character.
  29. # For example:
  30. #
  31. # targetCities=\
  32. # Detroit,\
  33. # Chicago,\
  34. # Los Angeles
  35. #
  36. # This is equivalent to targetCities=Detroit,Chicago,Los Angeles (white space at the beginning of lines is ignored).
  37. #
  38. # * The characters newline, carriage return, and tab can be inserted with characters \n, \r, and \t, respectively.
  39. #
  40. # * The backslash character must be escaped as a double backslash. For example:
  41. #
  42. # path=c:\\docs\\doc1
  43. #
  44. # If you are running more than one instances of Graylog server you have to select one of these
  45. # instances as master. The master will perform some periodical tasks that non-masters won't perform.
  46. is_master = true
  47. # The auto-generated node ID will be stored in this file and read after restarts. It is a good idea
  48. # to use an absolute file path here if you are starting Graylog server from init scripts or similar.
  49. node_id_file = /usr/share/graylog/data/config/node-id
  50. # You MUST set a secret to secure/pepper the stored user passwords here. Use at least 64 characters.
  51. # Generate one by using for example: pwgen -N 1 -s 96
  52. password_secret = replacethiswithyourownsecret!
  53. # The default root user is named 'admin'
  54. #root_username = admin
  55. # You MUST specify a hash password for the root user (which you only need to initially set up the
  56. # system and in case you lose connectivity to your authentication backend)
  57. # This password cannot be changed using the API or via the web interface. If you need to change it,
  58. # modify it in this file.
  59. # Create one by using for example: echo -n yourpassword | shasum -a 256
  60. # and put the resulting hash value into the following line
  61. # Default password: admin
  62. # CHANGE THIS!
  63. root_password_sha2 = 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
  64. # The email address of the root user.
  65. # Default is empty
  66. #root_email = ""
  67. # The time zone setting of the root user. See http://www.joda.org/joda-time/timezones.html for a list of valid time zones.
  68. # Default is UTC
  69. #root_timezone = UTC
  70. # Set plugin directory here (relative or absolute)
  71. plugin_dir = /usr/share/graylog/plugin
  72. ###############
  73. # HTTP settings
  74. ###############
  75. #### HTTP bind address
  76. #
  77. # The network interface used by the Graylog HTTP interface.
  78. #
  79. # This network interface must be accessible by all Graylog nodes in the cluster and by all clients
  80. # using the Graylog web interface.
  81. #
  82. # If the port is omitted, Graylog will use port 9000 by default.
  83. #
  84. # Default: 127.0.0.1:9000
  85. #http_bind_address = 127.0.0.1:9000
  86. #http_bind_address = [2001:db8::1]:9000
  87. http_bind_address = 0.0.0.0:9000
  88. #### HTTP publish URI
  89. #
  90. # The HTTP URI of this Graylog node which is used to communicate with the other Graylog nodes in the cluster and by all
  91. # clients using the Graylog web interface.
  92. #
  93. # The URI will be published in the cluster discovery APIs, so that other Graylog nodes will be able to find and connect to this Graylog node.
  94. #
  95. # This configuration setting has to be used if this Graylog node is available on another network interface than $http_bind_address,
  96. # for example if the machine has multiple network interfaces or is behind a NAT gateway.
  97. #
  98. # If $http_bind_address contains a wildcard IPv4 address (0.0.0.0), the first non-loopback IPv4 address of this machine will be used.
  99. # This configuration setting *must not* contain a wildcard address!
  100. #
  101. # Default: http://$http_bind_address/
  102. #http_publish_uri = http://192.168.1.1:9000/
  103. #### External Graylog URI
  104. #
  105. # The public URI of Graylog which will be used by the Graylog web interface to communicate with the Graylog REST API.
  106. #
  107. # The external Graylog URI usually has to be specified, if Graylog is running behind a reverse proxy or load-balancer
  108. # and it will be used to generate URLs addressing entities in the Graylog REST API (see $http_bind_address).
  109. #
  110. # When using Graylog Collector, this URI will be used to receive heartbeat messages and must be accessible for all collectors.
  111. #
  112. # This setting can be overriden on a per-request basis with the "X-Graylog-Server-URL" HTTP request header.
  113. #
  114. # Default: $http_publish_uri
  115. #http_external_uri =
  116. #### Enable CORS headers for HTTP interface
  117. #
  118. # This is necessary for JS-clients accessing the server directly.
  119. # If these are disabled, modern browsers will not be able to retrieve resources from the server.
  120. # This is enabled by default. Uncomment the next line to disable it.
  121. #http_enable_cors = false
  122. #### Enable GZIP support for HTTP interface
  123. #
  124. # This compresses API responses and therefore helps to reduce
  125. # overall round trip times. This is enabled by default. Uncomment the next line to disable it.
  126. #http_enable_gzip = false
  127. # The maximum size of the HTTP request headers in bytes.
  128. #http_max_header_size = 8192
  129. # The size of the thread pool used exclusively for serving the HTTP interface.
  130. #http_thread_pool_size = 16
  131. ################
  132. # HTTPS settings
  133. ################
  134. #### Enable HTTPS support for the HTTP interface
  135. #
  136. # This secures the communication with the HTTP interface with TLS to prevent request forgery and eavesdropping.
  137. #
  138. # Default: false
  139. #http_enable_tls = true
  140. # The X.509 certificate chain file in PEM format to use for securing the HTTP interface.
  141. #http_tls_cert_file = /path/to/graylog.crt
  142. # The PKCS#8 private key file in PEM format to use for securing the HTTP interface.
  143. #http_tls_key_file = /path/to/graylog.key
  144. # The password to unlock the private key used for securing the HTTP interface.
  145. #http_tls_key_password = secret
  146. # Comma separated list of trusted proxies that are allowed to set the client address with X-Forwarded-For
  147. # header. May be subnets, or hosts.
  148. #trusted_proxies = 127.0.0.1/32, 0:0:0:0:0:0:0:1/128
  149. # List of Elasticsearch hosts Graylog should connect to.
  150. # Need to be specified as a comma-separated list of valid URIs for the http ports of your elasticsearch nodes.
  151. # If one or more of your elasticsearch hosts require authentication, include the credentials in each node URI that
  152. # requires authentication.
  153. #
  154. # Default: http://127.0.0.1:9200
  155. elasticsearch_hosts = http://elasticsearch:9200
  156. # Maximum amount of time to wait for successfull connection to Elasticsearch HTTP port.
  157. #
  158. # Default: 10 Seconds
  159. #elasticsearch_connect_timeout = 10s
  160. # Maximum amount of time to wait for reading back a response from an Elasticsearch server.
  161. #
  162. # Default: 60 seconds
  163. #elasticsearch_socket_timeout = 60s
  164. # Maximum idle time for an Elasticsearch connection. If this is exceeded, this connection will
  165. # be tore down.
  166. #
  167. # Default: inf
  168. #elasticsearch_idle_timeout = -1s
  169. # Maximum number of total connections to Elasticsearch.
  170. #
  171. # Default: 20
  172. #elasticsearch_max_total_connections = 20
  173. # Maximum number of total connections per Elasticsearch route (normally this means per
  174. # elasticsearch server).
  175. #
  176. # Default: 2
  177. #elasticsearch_max_total_connections_per_route = 2
  178. # Maximum number of times Graylog will retry failed requests to Elasticsearch.
  179. #
  180. # Default: 2
  181. #elasticsearch_max_retries = 2
  182. # Enable automatic Elasticsearch node discovery through Nodes Info,
  183. # see https://www.elastic.co/guide/en/elasticsearch/reference/5.4/cluster-nodes-info.html
  184. #
  185. # WARNING: Automatic node discovery does not work if Elasticsearch requires authentication, e. g. with Shield.
  186. #
  187. # Default: false
  188. #elasticsearch_discovery_enabled = true
  189. # Filter for including/excluding Elasticsearch nodes in discovery according to their custom attributes,
  190. # see https://www.elastic.co/guide/en/elasticsearch/reference/5.4/cluster.html#cluster-nodes
  191. #
  192. # Default: empty
  193. #elasticsearch_discovery_filter = rack:42
  194. # Frequency of the Elasticsearch node discovery.
  195. #
  196. # Default: 30s
  197. # elasticsearch_discovery_frequency = 30s
  198. # Enable payload compression for Elasticsearch requests.
  199. #
  200. # Default: false
  201. #elasticsearch_compression_enabled = true
  202. # Disable checking the version of Elasticsearch for being compatible with this Graylog release.
  203. # WARNING: Using Graylog with unsupported and untested versions of Elasticsearch may lead to data loss!
  204. #elasticsearch_disable_version_check = true
  205. # Disable message retention on this node, i. e. disable Elasticsearch index rotation.
  206. #no_retention = false
  207. # Do you want to allow searches with leading wildcards? This can be extremely resource hungry and should only
  208. # be enabled with care. See also: http://docs.graylog.org/en/2.1/pages/queries.html
  209. allow_leading_wildcard_searches = false
  210. # Do you want to allow searches to be highlighted? Depending on the size of your messages this can be memory hungry and
  211. # should only be enabled after making sure your Elasticsearch cluster has enough memory.
  212. allow_highlighting = false
  213. # Global request timeout for Elasticsearch requests (e. g. during search, index creation, or index time-range
  214. # calculations) based on a best-effort to restrict the runtime of Elasticsearch operations.
  215. # Default: 1m
  216. #elasticsearch_request_timeout = 1m
  217. # Global timeout for index optimization (force merge) requests.
  218. # Default: 1h
  219. #elasticsearch_index_optimization_timeout = 1h
  220. # Maximum number of concurrently running index optimization (force merge) jobs.
  221. # If you are using lots of different index sets, you might want to increase that number.
  222. # Default: 20
  223. #elasticsearch_index_optimization_jobs = 20
  224. # Time interval for index range information cleanups. This setting defines how often stale index range information
  225. # is being purged from the database.
  226. # Default: 1h
  227. #index_ranges_cleanup_interval = 1h
  228. # Batch size for the Elasticsearch output. This is the maximum (!) number of messages the Elasticsearch output
  229. # module will get at once and write to Elasticsearch in a batch call. If the configured batch size has not been
  230. # reached within output_flush_interval seconds, everything that is available will be flushed at once. Remember
  231. # that every outputbuffer processor manages its own batch and performs its own batch write calls.
  232. # ("outputbuffer_processors" variable)
  233. output_batch_size = 500
  234. # Flush interval (in seconds) for the Elasticsearch output. This is the maximum amount of time between two
  235. # batches of messages written to Elasticsearch. It is only effective at all if your minimum number of messages
  236. # for this time period is less than output_batch_size * outputbuffer_processors.
  237. output_flush_interval = 1
  238. # As stream outputs are loaded only on demand, an output which is failing to initialize will be tried over and
  239. # over again. To prevent this, the following configuration options define after how many faults an output will
  240. # not be tried again for an also configurable amount of seconds.
  241. output_fault_count_threshold = 5
  242. output_fault_penalty_seconds = 30
  243. # The number of parallel running processors.
  244. # Raise this number if your buffers are filling up.
  245. processbuffer_processors = 5
  246. outputbuffer_processors = 3
  247. # The following settings (outputbuffer_processor_*) configure the thread pools backing each output buffer processor.
  248. # See https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadPoolExecutor.html for technical details
  249. # When the number of threads is greater than the core (see outputbuffer_processor_threads_core_pool_size),
  250. # this is the maximum time in milliseconds that excess idle threads will wait for new tasks before terminating.
  251. # Default: 5000
  252. #outputbuffer_processor_keep_alive_time = 5000
  253. # The number of threads to keep in the pool, even if they are idle, unless allowCoreThreadTimeOut is set
  254. # Default: 3
  255. #outputbuffer_processor_threads_core_pool_size = 3
  256. # The maximum number of threads to allow in the pool
  257. # Default: 30
  258. #outputbuffer_processor_threads_max_pool_size = 30
  259. # UDP receive buffer size for all message inputs (e. g. SyslogUDPInput).
  260. #udp_recvbuffer_sizes = 1048576
  261. # Wait strategy describing how buffer processors wait on a cursor sequence. (default: sleeping)
  262. # Possible types:
  263. # - yielding
  264. # Compromise between performance and CPU usage.
  265. # - sleeping
  266. # Compromise between performance and CPU usage. Latency spikes can occur after quiet periods.
  267. # - blocking
  268. # High throughput, low latency, higher CPU usage.
  269. # - busy_spinning
  270. # Avoids syscalls which could introduce latency jitter. Best when threads can be bound to specific CPU cores.
  271. processor_wait_strategy = blocking
  272. # Size of internal ring buffers. Raise this if raising outputbuffer_processors does not help anymore.
  273. # For optimum performance your LogMessage objects in the ring buffer should fit in your CPU L3 cache.
  274. # Must be a power of 2. (512, 1024, 2048, ...)
  275. ring_size = 65536
  276. inputbuffer_ring_size = 65536
  277. inputbuffer_processors = 2
  278. inputbuffer_wait_strategy = blocking
  279. # Enable the disk based message journal.
  280. message_journal_enabled = true
  281. # The directory which will be used to store the message journal. The directory must me exclusively used by Graylog and
  282. # must not contain any other files than the ones created by Graylog itself.
  283. #
  284. # ATTENTION:
  285. # If you create a seperate partition for the journal files and use a file system creating directories like 'lost+found'
  286. # in the root directory, you need to create a sub directory for your journal.
  287. # Otherwise Graylog will log an error message that the journal is corrupt and Graylog will not start.
  288. message_journal_dir = /usr/share/graylog/data/journal
  289. # Journal hold messages before they could be written to Elasticsearch.
  290. # For a maximum of 12 hours or 5 GB whichever happens first.
  291. # During normal operation the journal will be smaller.
  292. #message_journal_max_age = 12h
  293. #message_journal_max_size = 5gb
  294. #message_journal_flush_age = 1m
  295. #message_journal_flush_interval = 1000000
  296. #message_journal_segment_age = 1h
  297. #message_journal_segment_size = 100mb
  298. # Number of threads used exclusively for dispatching internal events. Default is 2.
  299. #async_eventbus_processors = 2
  300. # How many seconds to wait between marking node as DEAD for possible load balancers and starting the actual
  301. # shutdown process. Set to 0 if you have no status checking load balancers in front.
  302. lb_recognition_period_seconds = 3
  303. # Journal usage percentage that triggers requesting throttling for this server node from load balancers. The feature is
  304. # disabled if not set.
  305. #lb_throttle_threshold_percentage = 95
  306. # Every message is matched against the configured streams and it can happen that a stream contains rules which
  307. # take an unusual amount of time to run, for example if its using regular expressions that perform excessive backtracking.
  308. # This will impact the processing of the entire server. To keep such misbehaving stream rules from impacting other
  309. # streams, Graylog limits the execution time for each stream.
  310. # The default values are noted below, the timeout is in milliseconds.
  311. # If the stream matching for one stream took longer than the timeout value, and this happened more than "max_faults" times
  312. # that stream is disabled and a notification is shown in the web interface.
  313. #stream_processing_timeout = 2000
  314. #stream_processing_max_faults = 3
  315. # Length of the interval in seconds in which the alert conditions for all streams should be checked
  316. # and alarms are being sent.
  317. #alert_check_interval = 60
  318. # Since 0.21 the Graylog server supports pluggable output modules. This means a single message can be written to multiple
  319. # outputs. The next setting defines the timeout for a single output module, including the default output module where all
  320. # messages end up.
  321. #
  322. # Time in milliseconds to wait for all message outputs to finish writing a single message.
  323. #output_module_timeout = 10000
  324. # Time in milliseconds after which a detected stale master node is being rechecked on startup.
  325. #stale_master_timeout = 2000
  326. # Time in milliseconds which Graylog is waiting for all threads to stop on shutdown.
  327. #shutdown_timeout = 30000
  328. # MongoDB connection string
  329. # See https://docs.mongodb.com/manual/reference/connection-string/ for details
  330. mongodb_uri = mongodb://mongo/graylog
  331. # Authenticate against the MongoDB server
  332. #mongodb_uri = mongodb://grayloguser:secret@mongo:27017/graylog
  333. # Use a replica set instead of a single host
  334. #mongodb_uri = mongodb://grayloguser:secret@mongo:27017,mongo:27018,mongo:27019/graylog
  335. # Increase this value according to the maximum connections your MongoDB server can handle from a single client
  336. # if you encounter MongoDB connection problems.
  337. mongodb_max_connections = 100
  338. # Number of threads allowed to be blocked by MongoDB connections multiplier. Default: 5
  339. # If mongodb_max_connections is 100, and mongodb_threads_allowed_to_block_multiplier is 5,
  340. # then 500 threads can block. More than that and an exception will be thrown.
  341. # http://api.mongodb.com/java/current/com/mongodb/MongoOptions.html#threadsAllowedToBlockForConnectionMultiplier
  342. mongodb_threads_allowed_to_block_multiplier = 5
  343. # Drools Rule File (Use to rewrite incoming log messages)
  344. # See: http://docs.graylog.org/en/2.1/pages/drools.html
  345. #rules_file = /etc/graylog/server/rules.drl
  346. # Email transport
  347. #transport_email_enabled = false
  348. #transport_email_hostname = mail.example.com
  349. #transport_email_port = 587
  350. #transport_email_use_auth = true
  351. #transport_email_use_tls = true
  352. #transport_email_use_ssl = true
  353. #transport_email_auth_username = you@example.com
  354. #transport_email_auth_password = secret
  355. #transport_email_subject_prefix = [graylog]
  356. #transport_email_from_email = graylog@example.com
  357. # Specify and uncomment this if you want to include links to the stream in your stream alert mails.
  358. # This should define the fully qualified base url to your web interface exactly the same way as it is accessed by your users.
  359. #transport_email_web_interface_url = https://graylog.example.com
  360. # The default connect timeout for outgoing HTTP connections.
  361. # Values must be a positive duration (and between 1 and 2147483647 when converted to milliseconds).
  362. # Default: 5s
  363. #http_connect_timeout = 5s
  364. # The default read timeout for outgoing HTTP connections.
  365. # Values must be a positive duration (and between 1 and 2147483647 when converted to milliseconds).
  366. # Default: 10s
  367. #http_read_timeout = 10s
  368. # The default write timeout for outgoing HTTP connections.
  369. # Values must be a positive duration (and between 1 and 2147483647 when converted to milliseconds).
  370. # Default: 10s
  371. #http_write_timeout = 10s
  372. # HTTP proxy for outgoing HTTP connections
  373. #http_proxy_uri =
  374. # The threshold of the garbage collection runs. If GC runs take longer than this threshold, a system notification
  375. # will be generated to warn the administrator about possible problems with the system. Default is 1 second.
  376. #gc_warning_threshold = 1s
  377. # Connection timeout for a configured LDAP server (e. g. ActiveDirectory) in milliseconds.
  378. #ldap_connection_timeout = 2000
  379. # Disable the use of SIGAR for collecting system stats
  380. #disable_sigar = false
  381. # The default cache time for dashboard widgets. (Default: 10 seconds, minimum: 1 second)
  382. #dashboard_widget_default_cache_time = 10s
  383. # Automatically load content packs in "content_packs_dir" on the first start of Graylog.
  384. content_packs_loader_enabled = true
  385. # The directory which contains content packs which should be loaded on the first start of Graylog.
  386. content_packs_dir = /usr/share/graylog/data/contentpacks
  387. # A comma-separated list of content packs (files in "content_packs_dir") which should be applied on
  388. # the first start of Graylog.
  389. # Default: empty
  390. content_packs_auto_load = grok-patterns.json
  391. # For some cluster-related REST requests, the node must query all other nodes in the cluster. This is the maximum number
  392. # of threads available for this. Increase it, if '/cluster/*' requests take long to complete.
  393. # Should be http_thread_pool_size * average_cluster_size if you have a high number of concurrent users.
  394. proxied_requests_thread_pool_size = 32