-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
93 lines (85 loc) · 2.16 KB
/
config.yaml
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
webhooks:
example:
method: POST
path: /webhook/example
auth:
headers:
- name: Authorization
valueFromEnv: TEST_SHARED_WEB_HOOK_KEY
response:
code: 200
headers:
- name: Access-Control-Allow-Origin
value: "*"
message: "ok"
collectors:
- id: example
transform: "."
animals:
method: POST
path: /animals
response:
code: 204
collectors:
- id: animals
collectors:
example:
namespace: example
defaultLabels:
- name: environment
value: '"beta"'
metrics:
- name: global_value
help: Example of a top-level global value scrape in the json
type: gauge
value: .counter
labels:
- name: location
value: '"planet-"+ .location'
- name: inactive_value_count
help: Example of a timestamped value scrape in the json
path: .values[]
filter: '.state == "INACTIVE"'
value: ".count"
- name: active_count
help: Example of a gauge metrics with add operation
type: gauge
path: .values[]
filter: '.state == "ACTIVE"'
operation: add
- name: value_active
help: Example of sub-level value scrapes from a json
path: .values[]
filter: '.state == "ACTIVE"'
labels:
- name: id
value: .id
- name: value_count
help: Example of sub-level value scrapes from a json
path: .values[]
filter: '.state == "ACTIVE"'
value: ".count"
labels:
- name: id
value: .id
- name: value_boolean
help: Example of sub-level value scrapes from a json
path: .values[]
filter: '.state == "ACTIVE"'
value: ".some_boolean"
labels:
- name: id
value: .id
animals:
defaultLabels:
- name: name
value: .noun
metrics:
- name: animal_population
help: Example of top-level lists in a separate collectors
type: gauge
path: ".[]"
value: .population
labels:
- name: predator
value: .predator