nshttpd / mikrotik-exporter

prometheus mikrotik device(s) exporter
BSD 3-Clause "New" or "Revised" License
558 stars 153 forks source link

Prometheus config file example #122

Open boxerwba opened 3 years ago

boxerwba commented 3 years ago

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

lisenet commented 2 years ago

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