Skip to content

Call a specific job scrape via a query string #178

@tchabit

Description

@tchabit

Hello,

I'm new to prometheus and trying to have a different scrapping interval for collectors, without having to configure two sql_exporter services.

Despite using the exemple here : #37 (comment) , I did not find a way for prometheus to call one specific 'job' defined in sql_exporter.yml

jobs:
  - job_name: test1
    collectors: [ports]
    static_configs:
      - targets:
          data1: 'mysql://test:test@localhost:3306/test'

  - job_name: test2
    collectors: [devices]
    static_configs:
      - targets:
          data2:  'mysql://test:test@localhost:3306/test'

With this configuration it add an instance -target db name) and job label but I dont find how to call only one "sql_exporter job" from prometheus or through curl as I dont find a way to make params works.

Am I missing something ?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions