File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+
3+ scrape_configs :
4+ - job_name : prometheus
5+ static_configs :
6+ - targets : ['localhost:9090']
7+
8+ - job_name : node
9+ static_configs :
10+ - targets : ['localhost:9100']
11+
12+ - job_name : caddy
13+ static_configs :
14+ - targets : ['localhost:2019']
Original file line number Diff line number Diff line change 162162 enabled : true
163163 state : started
164164
165+ # Monitoring setup
166+ # ################
167+ - name : Configure Prometheus
168+ ansible.builtin.copy :
169+ src : prometheus.yml
170+ dest : /etc/prometheus/prometheus.yml
171+ mode : 0644
172+ notify :
173+ - Restart Prometheus
174+
175+ - name : Enable prometheus node exporter service
176+ ansible.builtin.systemd :
177+ name : prometheus-node-exporter.service
178+ enabled : true
179+ state : started
180+
181+ - name : Enable prometheus service
182+ ansible.builtin.systemd :
183+ name : prometheus.service
184+ enabled : true
185+ state : started
186+
165187 # Handlers restart/reload services at playbook completion
166188 # #######################################################
167189 handlers :
179201 name : caddy
180202 state : restarted
181203
204+ - name : Restart Prometheus
205+ ansible.builtin.systemd :
206+ name : prometheus
207+ state : restarted
208+
182209 - name : Restart webhook
183210 ansible.builtin.systemd :
184211 name : webhook
You can’t perform that action at this time.
0 commit comments