Skip to content

Different collector file for each differrent job #347

Description

@JesusFrontelo

Hi,

I´m trying to config multiple jobs, and i want to use different collector files for some specific jobs. Is there a way to acomplish that?
i´m getting the error level=error func=Fatalf msg="Error creating exporter: unknown fields in job: collector_files" when i try to add collector_files field to a job.

for example:

jobs:
  - job_name: DB-NAME1
    collector_files:
      - /path/to/collector_file/collector1.yml
    static_configs:
        - targets:
            Database1: 'pg://user@*.*.*.*:3306/postgres?sslmode=disable'
  - job_name: DB-NAME2
    collector_files:
      - /path/to/collector_file/collector2.yml
    static_configs:
        - targets:
            Database2: 'pg://user@*.*.*.*:3306/postgres?sslmode=disable'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions