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

"INVALID" is not a valid start token #18

Open
tlgdevops opened this issue Oct 17, 2019 · 2 comments
Open

"INVALID" is not a valid start token #18

tlgdevops opened this issue Oct 17, 2019 · 2 comments

Comments

@tlgdevops
Copy link

hello,
I find myself unable to parse the metrics from script_exporter on prometheus.
My exporter config looks like this:

scripts:
  - name: login
    script: python /etc/prometheus/script_exporter/frontoffice.py login
    timeout: 15

I can successfully reach the metrics for my script on :9172/probe?name=login
However when adding to Prometheus I see the target as DOWN with this errors

"INVALID" is not a valid start token

My exporter configuration looks like this:

 - job_name: synthetics
    metrics_path: '/probe?name=login'
    static_configs:
      - targets: ['localhost:9172']

I've tried some variations of the scrape config to no success. Some documentation on usage from Prometheus would be greatly appreciated :)

thaks!

@tlgdevops
Copy link
Author

fwiw, I ran these against promtool and only got a lint warning:

# curl -s http://localhost:9172/probe?pattern=.* | ./promtool check metrics
script_duration_seconds no help text
script_success no help text

@pint2oo
Copy link

pint2oo commented Mar 25, 2020

Hi,

Adding the name of the script you're calling in the params section of your Prometheus config should solve that.

Here, with the default "failure" script :

  - job_name: 'script_exporter'
    metrics_path: '/probe'
    params:
      name: ['failure']
    static_configs:
    - targets: ['ra1svlrq2n:9172']

Hopefully that helps,

pint2oo

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

2 participants