Closed metinkilicse closed 1 year 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
Role version:
4.0.0
Ansible version information:
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
Variables:
prometheus_scrape_jobs: - job_name: 'prometheusService' scrape_interval: 15s consul_sd_configs: - server: 'localhost:8500' services: - 'prometheusService'
Ansible playbook execution Logs:
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
This role has been deprecated in favor of a the prometheus-community/ansible collection.
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
Role version:
4.0.0
Ansible version information:
Variables:
Ansible playbook execution Logs:
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 :