repos / ops

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

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