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

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

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

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay