-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prometheus.yml
122 lines (110 loc) · 4.24 KB
/
prometheus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
####################################################################################################
# Copyright (c) 2023 Bahman Movaqar
#
# This file is part of lemmy-meter.
# lemmy-meter is free software: you can redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# lemmy-meter is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with lemmy-meter.
# If not, see <https://www.gnu.org/licenses/>.
####################################################################################################
---
####################################################################################################
# jobs
####################################################################################################
global:
scrape_interval: 1m
scrape_timeout: 57s
evaluation_interval: 1m
scrape_configs:
##################################################################################################
# api_getPosts
- job_name: api_getPosts
scrape_interval: 1m
metrics_path: /probe
file_sd_configs:
- refresh_interval: 10m
files:
- /etc/prometheus/blackbox-probe.d/http_api_2xx.yml
relabel_configs:
- source_labels: [__address__]
target_label: lemmy_instance
- source_labels: [__address__]
target_label: __param_target
replacement: https://$1/api/v3/post/list?limit=1
- target_label: __address__
replacement: blackbox_exporter:9115
- source_labels: [probe]
target_label: __param_module
##################################################################################################
# api_getComments
- job_name: api_getComments
scrape_interval: 1m
metrics_path: /probe
file_sd_configs:
- refresh_interval: 10m
files:
- /etc/prometheus/blackbox-probe.d/http_api_2xx.yml
relabel_configs:
- source_labels: [__address__]
target_label: lemmy_instance
replacement: $1
- source_labels: [__address__]
target_label: __param_target
replacement: https://$1/api/v3/comment/list?limit=1
- target_label: __address__
replacement: blackbox_exporter:9115
- source_labels: [probe]
target_label: __param_module
##################################################################################################
# api_getCommunities
- job_name: api_getCommunities
scrape_interval: 1m
metrics_path: /probe
file_sd_configs:
- refresh_interval: 10m
files:
- /etc/prometheus/blackbox-probe.d/http_api_2xx.yml
relabel_configs:
- source_labels: [__address__]
target_label: lemmy_instance
replacement: $1
- source_labels: [__address__]
target_label: __param_target
replacement: https://$1/api/v3/community/list?limit=1
- target_label: __address__
replacement: blackbox_exporter:9115
- source_labels: [probe]
target_label: __param_module
##################################################################################################
# webpage_landing_page
- job_name: webpage_landing_page
scrape_interval: 1m
metrics_path: /probe
file_sd_configs:
- refresh_interval: 10m
files:
- /etc/prometheus/blackbox-probe.d/http_page_2xx.yml
relabel_configs:
- source_labels: [__address__]
target_label: lemmy_instance
replacement: $1
- source_labels: [__address__]
target_label: __param_target
replacement: https://$1/
- target_label: __address__
replacement: blackbox_exporter:9115
- source_labels: [probe]
target_label: __param_module
##################################################################################################
# blackbox_exporter
- job_name: blackbox_exporter
metrics_path: /metrics
static_configs:
- targets:
- blackbox_exporter:9115