-
Notifications
You must be signed in to change notification settings - Fork 0
/
prom_rest_exporter.yml
39 lines (37 loc) · 1.03 KB
/
prom_rest_exporter.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
cache_time: 60
endpoints:
- port: 9011
meta_metrics: yes
targets:
- url: https://reqres.in/api/users
metrics:
- name: user_count
description: Number of users
type: gauge
selector: "[.data[].last_name] | length"
labels:
- name: env
fixed_value: prod
- name: user_id
description: User ids
type: gauge
selector: ".data[]"
val_selector: ".id"
labels:
- name: last_name
selector: .last_name
- url: https://reqres.in/api/unknown
metrics:
- name: years_total
description: Total number of years
type: gauge
selector: "[.data[].year] | add"
- port: 9012
cache_time: 10
targets:
- url: https://reqres.in/api/unknown
metrics:
- name: years_total
description: Total number of years
type: gauge
selector: "[.data[].year] | add"