-
Notifications
You must be signed in to change notification settings - Fork 6
/
example.yaml
98 lines (83 loc) · 2.43 KB
/
example.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
94
95
96
97
98
queries:
# name of metric
- metric: azure_resources
# skip metric publishing
# and only publish sub metrics rows (and use configuration only for submetrics)
# publish: false
# Azure ResourceGraph query
query: |-
Resources
| top 50 by name desc
## default value for metric
## eg for static metrics like informational metrics
value: 1
## additional labels (optional)
labels:
scope: resources
fields:
## name of the field from the result
- name: id
## target name for metric label
target: resourceId
## type of field
## id: use as identification (added to sub metrics)
## value: value of metric
## expand: parse value as sub json structure and create sub metric
## ignore: do not add this field
type: id
## apply filter to value
## available filters: toLower, toUpper, toTitle
filters: [toLower]
## example for regexp manipulation
## replace microsoft with foobar
- name: type
filters:
- type: regexp
regexp: "microsoft(.*)"
replacement: "foobar$1"
- name: enableRbacAuthorization
type: ignore
## expand tags into own metric
- name: tags
metric: azure_resources_tags
expand: {}
## additional labels (optional)
labels:
scope: resourcetags
## expand properties
- name: properties
metric: azure_resources_props
expand:
fields:
## ignore this field
- name: enableRbacAuthorization
type: ignore
defaultField:
type: ignore
- metric: azure_resourcestype_count
## only responds to /probe?module=summary
module: summary
query: |-
Resources
| summarize count() by type
fields:
## use count_ as metrics value
## hint: result field must be int or float
- name: count_
type: value
- metric: azure_resourcestype
## only responds to /probe?module=summary
module: summary
query: |-
Resources
| project type, tags
## only use following subscriptions
subscriptions2:
- axxxx-xxxxx-xxxxxx-xxxxx
- bxxxx-xxxxx-xxxxxx-xxxxx
- cxxxx-xxxxx-xxxxxx-xxxxx
fields:
## use count_ as metrics value
## hint: result field must be int or float
- name: count_
type: value