repos / ops

infra for pico services
git clone https://github.com/picosh/ops.git

ops / monitoring / prometheus / config
Antonio Mika · 23 Sep 24

prometheus.yml

  1global:
  2  scrape_interval: 30s
  3  scrape_timeout: 10s
  4
  5rule_files:
  6  - alert.yml
  7
  8scrape_configs:
  9  - job_name: prometheus
 10    static_configs:
 11      - targets:
 12          - prometheus:9090
 13  - job_name: grafana
 14    static_configs:
 15      - targets:
 16          - grafana:3000
 17  - job_name: cadvisor
 18    static_configs:
 19      - targets:
 20          - 10.0.0.48:9080 # oracle0
 21          - 10.0.0.220:9080 # oracle1
 22          - 10.0.0.134:9080 # oracle2
 23          - 10.0.0.150:9080 # oracle3
 24  - job_name: node_exporter
 25    static_configs:
 26      - targets:
 27          - 10.0.0.48:9100 # oracle0
 28          - 10.0.0.220:9100 # oracle1
 29          - 10.0.0.134:9100 # oracle2
 30          - 10.0.0.150:9100 # oracle3
 31  - job_name: wish
 32    tls_config:
 33      insecure_skip_verify: true
 34    scheme: https
 35    metrics_path: /_app/metrics
 36    static_configs:
 37      - targets:
 38          - prose.sh
 39          - pastes.sh
 40          - imgs.sh
 41          - pgs.sh
 42          - feeds.pico.sh
 43  - job_name: tuns
 44    tls_config:
 45      insecure_skip_verify: true
 46    scheme: https
 47    metrics_path: /_sish/metrics
 48    static_configs:
 49      - targets:
 50          - tuns.sh
 51  - job_name: soju
 52    tls_config:
 53      insecure_skip_verify: true
 54    scheme: https
 55    metrics_path: /_app/metrics
 56    static_configs:
 57      - targets:
 58          - irc.pico.sh
 59  - job_name: caddy
 60    tls_config:
 61      insecure_skip_verify: true
 62    scheme: https
 63    metrics_path: /_caddy/metrics
 64    static_configs:
 65      - targets:
 66          - prose.sh
 67          - pastes.sh
 68          - imgs.sh
 69          - pgs.sh
 70          - feeds.pico.sh
 71          - monitoring.pico.sh
 72          - minio.pico.sh
 73          - auth.pico.sh
 74  - job_name: minio
 75    tls_config:
 76      insecure_skip_verify: true
 77    scheme: https
 78    metrics_path: /minio/v2/metrics/cluster
 79    static_configs:
 80      - targets:
 81          - minio.pico.sh
 82  - job_name: imgprpxy
 83    tls_config:
 84      insecure_skip_verify: true
 85    scheme: https
 86    static_configs:
 87      - targets:
 88          - imgproxy.pico.sh
 89  - job_name: blackbox_exporter_ping
 90    metrics_path: "/probe"
 91    params:
 92      module:
 93        - icmp_check
 94    relabel_configs:
 95      - source_labels:
 96          - __address__
 97        target_label: __param_target
 98      - source_labels:
 99          - __param_target
100        target_label: instance
101      - target_label: __address__
102        replacement: blackbox_exporter:9115
103    static_configs:
104      - targets:
105          - prose.sh
106          - pastes.sh
107          - imgs.sh
108          - pgs.sh
109          - feeds.pico.sh
110          - tuns.sh
111          - monitoring.pico.sh
112          - minio.pico.sh
113          - chat.pico.sh
114          - auth.pico.sh
115          - imgproxy.pico.sh
116  - job_name: blackbox_exporter_ping_ip6
117    metrics_path: "/probe"
118    params:
119      module:
120        - icmp_check_ip6
121    relabel_configs:
122      - source_labels:
123          - __address__
124        target_label: __param_target
125      - source_labels:
126          - __param_target
127        target_label: instance
128      - target_label: __address__
129        replacement: blackbox_exporter:9115
130    static_configs:
131      - targets:
132          - prose.sh
133          - pastes.sh
134          - imgs.sh
135          - pgs.sh
136          - feeds.pico.sh
137          - tuns.sh
138          - monitoring.pico.sh
139          - minio.pico.sh
140          - chat.pico.sh
141          - auth.pico.sh
142          - imgproxy.pico.sh
143  - job_name: blackbox_exporter_ssh
144    metrics_path: "/probe"
145    params:
146      module:
147        - ssh_banner
148    relabel_configs:
149      - source_labels:
150          - __address__
151        target_label: __param_target
152      - source_labels:
153          - __param_target
154        target_label: instance
155      - target_label: __address__
156        replacement: blackbox_exporter:9115
157    static_configs:
158      - targets:
159          - prose.sh:22
160          - pastes.sh:22
161          - imgs.sh:22
162          - pgs.sh:22
163          - feeds.pico.sh:22
164          - tuns.sh:22
165          - prose.sh:650
166          - pastes.sh:650
167          - imgs.sh:650
168          - pgs.sh:650
169          - feeds.pico.sh:650
170          - monitoring.pico.sh:650
171          - minio.pico.sh:650
172          - chat.pico.sh:650
173          - auth.pico.sh:650
174  - job_name: blackbox_exporter_ssh_ip6
175    metrics_path: "/probe"
176    params:
177      module:
178        - ssh_banner_ip6
179    relabel_configs:
180      - source_labels:
181          - __address__
182        target_label: __param_target
183      - source_labels:
184          - __param_target
185        target_label: instance
186      - target_label: __address__
187        replacement: blackbox_exporter:9115
188    static_configs:
189      - targets:
190          - prose.sh:22
191          - pastes.sh:22
192          - imgs.sh:22
193          - pgs.sh:22
194          - feeds.pico.sh:22
195          - tuns.sh:22
196          - prose.sh:650
197          - pastes.sh:650
198          - imgs.sh:650
199          - pgs.sh:650
200          - feeds.pico.sh:650
201          - monitoring.pico.sh:650
202          - minio.pico.sh:650
203          - chat.pico.sh:650
204          - auth.pico.sh:650
205  - job_name: blackbox_exporter_https_2xx
206    metrics_path: "/probe"
207    params:
208      module:
209        - https_get_2xx
210    relabel_configs:
211      - source_labels:
212          - __address__
213        target_label: __param_target
214      - source_labels:
215          - __param_target
216        target_label: instance
217      - target_label: __address__
218        replacement: blackbox_exporter:9115
219    static_configs:
220      - targets:
221          - https://prose.sh
222          - https://pastes.sh
223          - https://pgs.sh
224          - https://feeds.pico.sh
225          - https://monitoring.pico.sh
226          - https://chat.pico.sh
227  - job_name: blackbox_exporter_https_2xx_ip6
228    metrics_path: "/probe"
229    params:
230      module:
231        - https_get_2xx_ip6
232    relabel_configs:
233      - source_labels:
234          - __address__
235        target_label: __param_target
236      - source_labels:
237          - __param_target
238        target_label: instance
239      - target_label: __address__
240        replacement: blackbox_exporter:9115
241    static_configs:
242      - targets:
243          - https://prose.sh
244          - https://pastes.sh
245          - https://pgs.sh
246          - https://feeds.pico.sh
247          - https://monitoring.pico.sh
248          - https://chat.pico.sh
249  - job_name: blackbox_exporter_https_3xx
250    metrics_path: "/probe"
251    params:
252      module:
253        - https_get_3xx
254    relabel_configs:
255      - source_labels:
256          - __address__
257        target_label: __param_target
258      - source_labels:
259          - __param_target
260        target_label: instance
261      - target_label: __address__
262        replacement: blackbox_exporter:9115
263    static_configs:
264      - targets:
265          - https://imgs.sh
266          - https://tuns.sh
267  - job_name: blackbox_exporter_https_3xx_ip6
268    metrics_path: "/probe"
269    params:
270      module:
271        - https_get_3xx_ip6
272    relabel_configs:
273      - source_labels:
274          - __address__
275        target_label: __param_target
276      - source_labels:
277          - __param_target
278        target_label: instance
279      - target_label: __address__
280        replacement: blackbox_exporter:9115
281    static_configs:
282      - targets:
283          - https://imgs.sh
284          - https://tuns.sh
285  - job_name: blackbox_exporter_https_4xx
286    metrics_path: "/probe"
287    params:
288      module:
289        - https_get_4xx
290    relabel_configs:
291      - source_labels:
292          - __address__
293        target_label: __param_target
294      - source_labels:
295          - __param_target
296        target_label: instance
297      - target_label: __address__
298        replacement: blackbox_exporter:9115
299    static_configs:
300      - targets:
301          - https://minio.pico.sh
302          - https://auth.pico.sh
303  - job_name: blackbox_exporter_https_4xx_ip6
304    metrics_path: "/probe"
305    params:
306      module:
307        - https_get_4xx_ip6
308    relabel_configs:
309      - source_labels:
310          - __address__
311        target_label: __param_target
312      - source_labels:
313          - __param_target
314        target_label: instance
315      - target_label: __address__
316        replacement: blackbox_exporter:9115
317    static_configs:
318      - targets:
319          - https://minio.pico.sh
320          - https://auth.pico.sh
321  - job_name: blackbox_exporter_http_3xx
322    metrics_path: "/probe"
323    params:
324      module:
325        - http_get_3xx
326    relabel_configs:
327      - source_labels:
328          - __address__
329        target_label: __param_target
330      - source_labels:
331          - __param_target
332        target_label: instance
333      - target_label: __address__
334        replacement: blackbox_exporter:9115
335    static_configs:
336      - targets:
337          - http://prose.sh
338          - http://pastes.sh
339          - http://imgs.sh
340          - http://pgs.sh
341          - http://feeds.pico.sh
342          - http://tuns.sh
343          - http://monitoring.pico.sh
344          - http://minio.pico.sh
345          - http://chat.pico.sh
346          - http://auth.pico.sh
347          - http://imgproxy.pico.sh
348  - job_name: blackbox_exporter_http_3xx_ip6
349    metrics_path: "/probe"
350    params:
351      module:
352        - http_get_3xx_ip6
353    relabel_configs:
354      - source_labels:
355          - __address__
356        target_label: __param_target
357      - source_labels:
358          - __param_target
359        target_label: instance
360      - target_label: __address__
361        replacement: blackbox_exporter:9115
362    static_configs:
363      - targets:
364          - http://prose.sh
365          - http://pastes.sh
366          - http://imgs.sh
367          - http://pgs.sh
368          - http://feeds.pico.sh
369          - http://tuns.sh
370          - http://monitoring.pico.sh
371          - http://minio.pico.sh
372          - http://chat.pico.sh
373          - http://auth.pico.sh
374          - http://imgproxy.pico.sh
375  - job_name: blackbox_exporter_tls
376    metrics_path: "/probe"
377    params:
378      module:
379        - tcps_connect
380    relabel_configs:
381      - source_labels:
382          - __address__
383        target_label: __param_target
384      - source_labels:
385          - __param_target
386        target_label: instance
387      - target_label: __address__
388        replacement: blackbox_exporter:9115
389    static_configs:
390      - targets:
391          - irc.pico.sh:6697
392  - job_name: blackbox_exporter_tls_ip6
393    metrics_path: "/probe"
394    params:
395      module:
396        - tcps_connect_ip6
397    relabel_configs:
398      - source_labels:
399          - __address__
400        target_label: __param_target
401      - source_labels:
402          - __param_target
403        target_label: instance
404      - target_label: __address__
405        replacement: blackbox_exporter:9115
406    static_configs:
407      - targets:
408          - irc.pico.sh:6697