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

Promtail: Fix timestamp parser for short year format #2708

Merged
merged 1 commit into from
Oct 1, 2020

Conversation

Falco20019
Copy link
Contributor

What this PR does / why we need it:
Using a short year format for timestamp in the pipeline break if trying to parse older log files.

...
scrape_configs:
- pipeline_stages:
...
  - timestamp:
      source: time
      format: 02.01.06 03:04:05.000
...

Which issue(s) this PR fixes:
Fixes #2653

Special notes for your reviewer:
I don't have a golang environment on my machine and was not able to properly run the Makefile on windows either. Only traced the cause by looking into the code base. I hope there is CI testing it.

Checklist

  • Documentation added
    -- Not necessary as it's a bug fix
  • Tests updated

@CLAassistant
Copy link

CLAassistant commented Oct 1, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cyriltovena cyriltovena merged commit 9e6afea into grafana:master Oct 1, 2020
@Falco20019 Falco20019 deleted the patch-1 branch October 9, 2020 06:24
cyriltovena pushed a commit to cyriltovena/loki that referenced this pull request Oct 21, 2020
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

timestamp '20/05/15 16:18:24' is expected to not contain the year date component
3 participants