Description of your problem
Index rotation happens at UTC every day, and the index ranges show “messages from 51 years ago”.
Logs are also not searchable within the web interface. The fix so far is to run an index recalculation of each Index set.
Description of steps you’ve taken to attempt to solve the issue
- Restarted graylog-server on all nodes to ensure started after mongodb
- Confirm that all clients connecting are time sync’d - although this is our dev logging environment and this is difficult to manage ongoing.
- Fixed all timestamp index errors and all indexing errors. We do currently have some timestamp WARNings. However these issues come and go and we are working towards getting rid of them.
Environmental information
Information about our AWS setup:
- graylog-server (version 3.3.12) cluster - running on ubuntu xenial hosts
- 1 graylog-server master
- 2 graylog-server slaves - accepts logs via Network Load Balancer
- Mongodb cluster (version 4.0 ) - 3 nodes - running on ubuntu xenial hosts
- Elasticsearch cluster (version 6.8.8) - running on Ubuntu Xenial hosts, 3 Master nodes, 4 data nodes.
Snippet of Index rotation output
2021-11-19T00:00:45.218Z INFO [SystemJobManager] SystemJob <ac5cda10-48cb-11ec-ba22-0a491ee5d31d> [org.graylog2.indexer.indices.jobs.SetIndexReadOnlyAndCalculateRangeJob] finished in 320ms.
2021-11-19T00:00:45.520Z INFO [SetIndexReadOnlyJob] Flushing old index <gcm_usqa_560>.
2021-11-19T00:00:45.680Z INFO [SetIndexReadOnlyJob] Setting old index <gcm_usqa_560> to read-only.
2021-11-19T00:00:45.768Z INFO [SystemJobManager] Submitted SystemJob <bec36480-48cb-11ec-ba22-0a491ee5d31d> [org.graylog2.indexer.indices.jobs.OptimizeIndexJob]
2021-11-19T00:00:45.774Z INFO [OptimizeIndexJob] Optimizing index <gcm_usqa_560>.
2021-11-19T00:00:45.783Z INFO [CreateNewSingleIndexRangeJob] Calculating ranges for index gcm_usqa_560.
2021-11-19T00:00:45.787Z INFO [MongoIndexRangeService] Calculated range of [gcm_usqa_560] in [2ms].
2021-11-19T00:00:45.788Z INFO [CreateNewSingleIndexRangeJob] Created ranges for index gcm_usqa_560.
2021-11-19T00:00:45.800Z INFO [SystemJobManager] SystemJob <acb903d0-48cb-11ec-ba22-0a491ee5d31d> [org.graylog2.indexer.indices.jobs.SetIndexReadOnlyAndCalculateRangeJob] finished in 299ms.
2021-11-19T00:00:46.148Z INFO [SetIndexReadOnlyJob] Flushing old index <tech-dev_253>.
2021-11-19T00:00:46.265Z INFO [SetIndexReadOnlyJob] Setting old index <tech-dev_253> to read-only.
2021-11-19T00:00:46.352Z INFO [SystemJobManager] Submitted SystemJob <bf1c8100-48cb-11ec-ba22-0a491ee5d31d> [org.graylog2.indexer.indices.jobs.OptimizeIndexJob]
2021-11-19T00:00:46.372Z INFO [CreateNewSingleIndexRangeJob] Calculating ranges for index tech-dev_253.
2021-11-19T00:00:46.372Z INFO [OptimizeIndexJob] Optimizing index <tech-dev_253>.
2021-11-19T00:00:46.430Z INFO [MongoIndexRangeService] Calculated range of [tech-dev_253] in [56ms].
2021-11-19T00:00:46.431Z INFO [CreateNewSingleIndexRangeJob] Created ranges for index tech-dev_253.
2021-11-19T00:00:46.444Z INFO [SystemJobManager] SystemJob <ad166610-48cb-11ec-ba22-0a491ee5d31d> [org.graylog2.indexer.indices.jobs.SetIndexReadOnlyAndCalculateRangeJob] finished in 330ms.
graylog-server worker node config
graylog-server config from worker node
elasticsearch_hosts = http://elasticsearch.MYDOMAIN.com:9200
mongodb_uri = mongodb+srv://mongodb.MYDOMAIN.com/graylog?ssl=false
http_bind_address = 10.15.0.218:9000
is_master = false
node_id_file = /etc/graylog/server/node-id
password_secret = <REMOVED>
root_username = admin
root_password_sha2 = <REMOVED>
root_email = "<MASKED>"
versionchecks = false
bin_dir = /usr/share/graylog-server/bin
data_dir = /var/lib/graylog-server
plugin_dir = /usr/share/graylog-server/plugin
elasticsearch_discovery_enabled = true
rotation_strategy = time
elasticsearch_max_time_per_index = 1d
elasticsearch_max_number_of_indices = 20
retention_strategy = delete
elasticsearch_shards = 3
elasticsearch_replicas = 2
elasticsearch_index_prefix = graylog
allow_leading_wildcard_searches = false
allow_highlighting = false
elasticsearch_analyzer = standard
output_batch_size = 500
output_flush_interval = 1
output_fault_count_threshold = 5
output_fault_penalty_seconds = 30
processbuffer_processors = 5
outputbuffer_processors = 3
processor_wait_strategy = blocking
ring_size = 65536
inputbuffer_ring_size = 65536
inputbuffer_processors = 5
inputbuffer_wait_strategy = blocking
message_journal_enabled = true
message_journal_dir = /var/lib/graylog-server/journal
message_journal_max_age = 96h
message_journal_max_size = 100gb
lb_recognition_period_seconds = 30
mongodb_max_connections = 1000
mongodb_threads_allowed_to_block_multiplier = 5
proxied_requests_thread_pool_size = 32