This commit is contained in:
@@ -26,6 +26,11 @@
|
||||
env:
|
||||
GF_AUTH_ANONYMOUS_ENABLED: "{{ GRAFANA_AUTH_ANONYMOUS_ENABLED }}"
|
||||
|
||||
- name: Copy Prometheus Config
|
||||
template:
|
||||
src: "prometheus.yml.j2"
|
||||
dest: "{{ data_dir }}/monitoring/prometheus/prometheus.yml"
|
||||
|
||||
- name: Create Prometheus Docker Container
|
||||
docker_container:
|
||||
name: prometheus
|
||||
|
19
templates/prometheus.yml.j2
Normal file
19
templates/prometheus.yml.j2
Normal file
@@ -0,0 +1,19 @@
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
evaluation_interval: 15s
|
||||
|
||||
scrape_configs:
|
||||
# Prometheus itself
|
||||
- job_name: "prometheus"
|
||||
static_configs:
|
||||
- targets: ["localhost:9090"]
|
||||
|
||||
# Node Exporter (system metrics)
|
||||
- job_name: "node-exporter"
|
||||
static_configs:
|
||||
- targets: ["node-exporter:9100"]
|
||||
|
||||
# Docker metrics
|
||||
- job_name: "cadvisor"
|
||||
static_configs:
|
||||
- targets: ["cadvisor:8083"]
|
Reference in New Issue
Block a user