cloudalchemy / ansible-prometheus

Deploy Prometheus monitoring system
MIT License
1.11k stars 454 forks source link

Can't see consul_sd_configs on prometheus.yml #385

Closed metinkilicse closed 1 year ago

metinkilicse commented 2 years ago

What did you do?

I'm trying to add a prometheus scrape job with variables.

Did you expect to see some different?

I would like to see it on prometheus.yml file and connect.

Environment

Ubuntu 20.04

    ansible [core 2.11.6] 
      config file = None
      configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
      ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible
      ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
      executable location = /usr/local/bin/ansible
      python version = 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0]
      jinja version = 2.11.3
      libyaml = True

No Fail

Anything else we need to know?:

I've created a Consul service called prometheusService and target is a kubernetes prometheus' port 9100. Trying to install a federation Prometheus with this configuration.

Prometheus.yml file :

global:
  evaluation_interval: 15s
  scrape_interval: 15s
  scrape_timeout: 10s

  external_labels:
    environment: node3.example.com

rule_files:
  - /etc/prometheus/rules/*.rules

scrape_configs:
  - job_name: prometheus
    metrics_path: /metrics
    static_configs:
    - targets:
      - node3.example.com:9090
  - file_sd_configs:
    - files:
      - /etc/prometheus/file_sd/node.yml
    job_name: node
SuperQ commented 1 year ago

This role has been deprecated in favor of a the prometheus-community/ansible collection.