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 config file example #122

Open
boxerwba opened this issue Oct 5, 2021 · 1 comment
Open

Prometheus config file example #122

boxerwba opened this issue Oct 5, 2021 · 1 comment

Comments

@boxerwba
Copy link

boxerwba commented Oct 5, 2021

Can someone provide own Prometheus config file?
image
I want to scrape metrics from two mikrotik.
Here is my non-working prom config:

  • job_name: 'mikrotik1'
    scrape_interval: 10s
    static_configs:

    • targets:
      • 10.10.75.1
        metrics_path: /metrics
        params:
        module: [my_router]
  • job_name: 'mikrotik2'
    scrape_interval: 10s
    static_configs:

    • targets:
      • 10.10.74.1
        metrics_path: /metrics
        params:
        module: [my_router]
@lisenet
Copy link

lisenet commented Dec 22, 2021

This is my config that works:

      - job_name: 'mikrotik-exporter'
        scrape_interval: 30s
        static_configs:
          - targets:
            - 10.11.1.1 # your Mikrotik router IP you wish to monitor
        metrics_path: /metrics
        params:
          module: [my_router]
        relabel_configs:
          - source_labels: [__address__]
            target_label: __param_target
          - source_labels: [__param_target]
            target_label: instance
          - target_label: __address__
            replacement: mikrotik-exporter:9436

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