-
Notifications
You must be signed in to change notification settings - Fork 17
/
example.yaml
154 lines (124 loc) · 5.9 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
---
azure:
# List of subscription IDs
# used to limit all scraping to these subscription IDs (if not set: use all visible subscriptions)
#subscriptions: []
# List of Azure locations/regions
# used to fetch quotas for these regions
locations: [westeurope, northeurope]
# List of tags
# used to attach these tags as labels ("tag_{tagname}") to metrics
# documentation: https://github.com/webdevops/go-common/blob/main/azuresdk/README.md#tag-handling
# examples:
# - owner?inherit&toLower
# - costCenter?source=resourceGroup&toLower
# - client?source=subscription&toUpper
# - foo?name=bar
resourceTags: []
resourceGroupTags: []
collectors:
# Subscription metrics
general:
# Defines how often it should scrape (not defined or 0 = disabled)
scrapeTime: 5m
# Resource and ResourceGroup metrics
resource:
scrapeTime: 5m
# Subscription quotas (needs locations)
quota:
scrapeTime: 5m
# Defender (security) metrics
# score, recommendations, ...
defender:
scrapeTime: 5m
# Health status of resources
resourceHealth:
scrapeTime: 5m
summaryMaxLength: 0
# RoleDefinitions & RoleAssignments
iam:
scrapeTime: 5m
# MsMgraph metrics (applications, serviceprincipals incl. credential/secrets expiry time)
graph:
scrapeTime: 5m
filter:
application: ""
servicePrincipal: ""
# Azure cost metrics (cost queries)
# needs queries below
costs:
scrapeTime: 60m
queries:
- # name of metric (azurerm_costs_${name})
name: by_resourceGroup
# metric help, optional
help: Costs by ResourceGroup
# optional, see https://learn.microsoft.com/en-us/rest/api/cost-management/query/usage?tabs=HTTP
# will disable fetching by subscription and will enable fetching by scope
#scopes: [...]
# '/subscriptions/{subscriptionId}/' for subscription scope
# '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope
# '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope
# '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope
# '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope
# '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope
# '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope
# '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope
# '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners
# filter by subscriptions (overwrite global subscription filter)
#subscriptions: [...]
# see https://learn.microsoft.com/en-us/rest/api/cost-management/query/usage?tabs=HTTP
# for tags use format: tag:{tagname}
# eg: tag:owner
dimensions: [ResourceGroupName]
# None, Daily, Monthly, Accumulated
granularity: None
# timePeriod:
# fromDuration: -720h
# toDuration: 0s
# UsageQuantity, PreTaxCost, Cost, CostUSD, PreTaxCostUSD, see https://learn.microsoft.com/en-us/rest/api/cost-management/query/usage?tabs=HTTP
valueField: PreTaxCost
# see https://learn.microsoft.com/en-us/rest/api/cost-management/query/usage?tabs=HTTP
timeFrames: [MonthToDate, YearToDate]
# optional, additional static labels
labels: {}
# Azure budget metrics
budgets:
scrapeTime: 1h
# optional, see https://learn.microsoft.com/en-us/rest/api/cost-management/query/usage?tabs=HTTP
# will disable fetching by subscription and will enable fetching by scope
#scopes: [...]
# '/subscriptions/{subscriptionId}/' for subscription scope
# '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope
# '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope
# '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope
# '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope
# '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope
# '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope
# '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope
# '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners
reservation:
scrapeTime: 1h
# resourceScopes:
#
# The scope associated with reservations summaries operations.
# This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy),
# and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}'
# for BillingProfile scope (modern).
#
# see https://learn.microsoft.com/en-us/rest/api/consumption/reservations-summaries/list?view=rest-consumption-2023-05-01&tabs=HTTP
scopes: []
granularity: daily # or monthly
fromDays: 30
# Portscan of Azure Public IPs
portscan:
scrapeTime: 12h
scanner: {}
# How many Azure Public IPs are scanned in parallel
# parallel: 2
# How many ports are scanned in parallel
# threads: 1000
# Timeout in seconds
# timeout: 5
# Ports to scan
# ports: [22,80,443,3389]