File tree 2 files changed +41
-0
lines changed 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 172
172
enabled : true
173
173
state : started
174
174
175
+ # Monitoring setup
176
+ # ################
177
+ - name : Configure Prometheus
178
+ ansible.builtin.copy :
179
+ src : prometheus.yml
180
+ dest : /etc/prometheus/prometheus.yml
181
+ mode : 0644
182
+ notify :
183
+ - Restart Prometheus
184
+
185
+ - name : Enable prometheus node exporter service
186
+ ansible.builtin.systemd :
187
+ name : prometheus-node-exporter.service
188
+ enabled : true
189
+ state : started
190
+
191
+ - name : Enable prometheus service
192
+ ansible.builtin.systemd :
193
+ name : prometheus.service
194
+ enabled : true
195
+ state : started
196
+
175
197
# Handlers restart/reload services at playbook completion
176
198
# #######################################################
177
199
handlers :
189
211
name : caddy
190
212
state : restarted
191
213
214
+ - name : Restart Prometheus
215
+ ansible.builtin.systemd :
216
+ name : prometheus
217
+ state : restarted
218
+
192
219
- name : Restart webhook
193
220
ansible.builtin.systemd :
194
221
name : webhook
You can’t perform that action at this time.
0 commit comments