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

Clarify error message when no valid target scrape config is defined for promtail job #4524

Merged
merged 1 commit into from
Oct 21, 2021

Conversation

dannykopping
Copy link
Contributor

@dannykopping dannykopping commented Oct 21, 2021

What this PR does / why we need it:
I was recently trying to understand why I was getting this error message:

unable to create logs instance: unknown scrape config when using the Grafana Agent with this config:

...loki:
  configs:
      ...
      name: default
      scrape_configs:
        - job_name: my-job-name
          pipeline_stages:
            - multiline:
                firstline: '^\d{4}-\d{2}-\d{2}\s\d{1,2}\:\d{2}\:\d{2}\.\d{3}'
...

The problem here is not that the scrape config is unknown, but rather that there is no target scrape config defined for this particular job.

Which issue(s) this PR fixes:
N/A

Special notes for your reviewer:
Slack thread with one of our Solutions Engineers

Checklist

  • Documentation added
  • Tests updated

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
@dannykopping dannykopping marked this pull request as ready for review October 21, 2021 20:58
@dannykopping dannykopping requested a review from a team as a code owner October 21, 2021 20:58
@dannykopping dannykopping merged commit cc1d478 into grafana:main Oct 21, 2021
@dannykopping dannykopping deleted the dannykopping/clear-error branch October 21, 2021 21:11
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.

2 participants