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

Docs feedback: /getting-started/labels.md #3639

Closed
Ruppsn opened this issue Apr 21, 2021 · 9 comments
Closed

Docs feedback: /getting-started/labels.md #3639

Ruppsn opened this issue Apr 21, 2021 · 9 comments

Comments

@Ruppsn
Copy link
Contributor

Ruppsn commented Apr 21, 2021

Hello,
I believe the following is not right:

scrape_configs:
 - job_name: system
   pipeline_stages:
   static_configs:
   - targets:
      - localhost
     labels:
      job: syslog
      __path__: /var/log/syslog
 - job_name: system
   pipeline_stages:
   static_configs:
   - targets:
      - localhost
     labels:
      job: apache
      __path__: /var/log/apache.log

If i run these both with the same job_name, only the last one with the same name will be active.
If i change it to something like this:

scrape_configs:
 - job_name: system
   pipeline_stages:
   static_configs:
   - targets:
      - localhost
     labels:
      job: syslog
      __path__: /var/log/syslog
 - job_name: system1
   pipeline_stages:
   static_configs:
   - targets:
      - localhost
     labels:
      job: apache
      __path__: /var/log/apache.log

Both rules are working.

Can someone confirm this?

I am using promtail 2.2.1

@hugohaggmark
Copy link

Passing this over to @grafana/docs-squad

@osg-grafana
Copy link
Contributor

@oddlittlebird would this be in your court?

@achatterjee-grafana
Copy link
Contributor

@ivanahuckova, can you take a look at this and we can make the necessary doc changes. Thank you!

@achatterjee-grafana
Copy link
Contributor

@Ruppsn, can you point me to the topic where you found the code snippet? Thank you.

@Ruppsn
Copy link
Contributor Author

Ruppsn commented Apr 22, 2021

@achatterjee-grafana sure thing :)
https://grafana.com/docs/loki/latest/getting-started/labels/

Its the second snippet. Can you confirm that its not working with both job names the same?

Thank you all for your support! Its really nice if a user can feel the community <3

@achatterjee-grafana achatterjee-grafana transferred this issue from grafana/grafana Apr 22, 2021
@achatterjee-grafana
Copy link
Contributor

Transferred to Loki repo, as it is a Loki issue.

@hugohaggmark
Copy link

@achatterjee-grafana if this is transferred to Loki, I'm going to close this one.

@achatterjee-grafana
Copy link
Contributor

The issue is now in Loki - will close after I have fixed it.

@achatterjee-grafana
Copy link
Contributor

achatterjee-grafana commented Apr 22, 2021

Issue fixed with PR #3641. Thanks, @owen-d.

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

No branches or pull requests

5 participants