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 162
162
enabled : true
163
163
state : started
164
164
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
+
165
187
# Handlers restart/reload services at playbook completion
166
188
# #######################################################
167
189
handlers :
179
201
name : caddy
180
202
state : restarted
181
203
204
+ - name : Restart Prometheus
205
+ ansible.builtin.systemd :
206
+ name : prometheus
207
+ state : restarted
208
+
182
209
- name : Restart webhook
183
210
ansible.builtin.systemd :
184
211
name : webhook
You can’t perform that action at this time.
0 commit comments