Skip to content

Multiple datasource for MSSQL #682

Closed Answered by burningalchemist
hamedkhosrawi asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @hamedkhosrawi, the configuration provided on your end is incorrect, try this out:

...
jobs:
  - job_name: multi_datasource_job
    static_configs:
      - targets:
            local: "sqlserver://USER_MON:FK*[email protected]:1433/master"
            stage: "sqlserver://SA:[email protected]:1433/master"
    collectors:
      - stage_db
...

The difference is as follows:

  1. should be job_name instead of name for job names;
  2. static_configs is a list of targets, but each targets item is a map (not a list);
  3. in each targets map, you may provide key=value pairs, where the key is the name of the target (e.g. stage), and the value is a working connection string.

You can fi…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by hamedkhosrawi
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants