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

Prometheus 2: no token found for scraping target #2959

Closed
iobestar opened this Issue Jul 17, 2017 · 7 comments

Comments

Projects
None yet
4 participants
@iobestar
Copy link

iobestar commented Jul 17, 2017

What did you do?
Set up monitoring side-by side Prometheus 1.x and Prometheus 2.x

What did you expect to see?
Identical set of active scraping targets.

What did you see instead? Under which circumstances?
Some scraping targets are down on Prometheus 2.x with exception "no token found".

  • Prometheus version:
    prometheus, version 2.0.0-beta.0 (branch: master, revision: 2b5d915)
    build user: root@fc24486243df
    build date: 20170712-12:24:53
    go version: go1.8.3

After troubleshooting I discover that a problem is in label name. When metric has label which starts with underscore scraping fails. For example:
FAILS: DatabaseInvoker_MaxWorkers{_name="Main",} 10.0
OK: DatabaseInvoker_MaxWorkers{name="Main",} 10.0

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jul 17, 2017

A leading underscore on a labelname is discouraged, however it is supported.

@juliusv juliusv self-assigned this Jul 17, 2017

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Jul 17, 2017

Fixing.

juliusv added a commit that referenced this issue Jul 17, 2017

Allow metric and label names to begin with underscores
While this is not recommended, it is allowed in our data model
(https://prometheus.io/docs/concepts/data_model/).

Fixes #2959
@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Jul 17, 2017

Fix in #2961

juliusv added a commit that referenced this issue Jul 18, 2017

Allow metric and label names to begin with underscores (#2961)
While this is not recommended, it is allowed in our data model
(https://prometheus.io/docs/concepts/data_model/).

Fixes #2959
@gouthamve

This comment has been minimized.

Copy link
Member

gouthamve commented Jul 21, 2017

Can this be closed?

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Jul 21, 2017

@gouthamve Thanks, yes, closing.

I don't understand why this issue wasn't auto-closed, since #2961 contained a "Fixes ..." mention for this issue in the commit and PR description.

@juliusv juliusv closed this Jul 21, 2017

@gouthamve

This comment has been minimized.

Copy link
Member

gouthamve commented Jul 22, 2017

That is because issues are closed only when merges happen into the default branch of the repo. I was also surprised and had to look the exact rules up.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.