DEV Community

Cover image for prometheus.yml file for Consul
tj_27
tj_27

Posted on

prometheus.yml file for Consul


global:
    scrape_insterval: 15s
    evaluation_interval: 15s

scrapre_configs:
    - job_name: 'consul'
    consul_sd_configs:
        - server: 'localhost:8500'
          service: []
    relabel_configs:
        - source_labels: [__meta_consul_tags]
          regex: .*,prometheus,.*
          action: keep
        - source_labels: [__meta_consul_service]
          targe_label: job
        - source_labels: [__meta_consul_service_metadaata_project]
          target_lable: project
        - source_labels: [__meta_consul_service_metadata_hostname]
          target_label: hostname
        - source_labels: [__meta_consul_service_metadaata_exporter]
          target_label: exporter
        - source_labels: [__meta_consul_service_metadaata_app]
          target_label: app
        - source_labels: [__meta_consul_service_metadaata_groupname]
          target_label: groupname
        - source_labels: [__meta_consul_service_metadaata_tag]
          target_label: tag
        - source_labels: [__meta_consul_service_address, __meta_consul_service_port]
          separator: ':'
          target_label: instance
          regex: '(.+):(.+)'
          replacement: '$1:+$2'


Enter fullscreen mode Exit fullscreen mode

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay