Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize timestamps in ingested messages to current time if in the future #21408

Open
dennisoelkers opened this issue Jan 22, 2025 · 1 comment · May be fixed by #21429
Open

Normalize timestamps in ingested messages to current time if in the future #21408

dennisoelkers opened this issue Jan 22, 2025 · 1 comment · May be fixed by #21429
Assignees

Comments

@dennisoelkers
Copy link
Member

dennisoelkers commented Jan 22, 2025

Expected Behavior

When ingesting messages, a timestamp that is obviously in the future (maybe with a grace period) should be normalized to the current time of the Graylog node.

Current Behavior

Currently, the timestamp of a messages will be taken as is, if it can be parsed. It is generally fine to trust the client, but it is also very easy to misconfigure (e.g. when using timestamps with a wrong resolution). Also, accidentally ingesting messages with timestamps far in the future will lead to the index range of the index this message ends up in to have an end date that leads to inclusion in far more search queries than necessary - potentially all "last five minute" searches until the end date is reached.

If we worry about backward compatibility/breaking weird setups, we could introduce a config setting to disable this.

Possible Solution

We should - either by default or configurable - normalize the timestamp of a message ingested to the current time, if the timestamp of the message is > now + grace.

Steps to Reproduce (for bugs)

  1. Ingest message with future timestamp
  2. Rotate indices of index set this message ended up in
  3. Check index range of index
  4. Check that index will be included in now - 5m queries as well

Context

Your Environment

  • Graylog Version:
  • Java Version:
  • OpenSearch Version:
  • MongoDB Version:
  • Operating System:
  • Browser version:
@tellistone
Copy link

IMO high priority to fix this blind spot, because this sort of thing is not good news for warm tier performance:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants