jokeru@box:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy
jokeru@box:~# alloy --version
alloy, version v1.0.0 (branch: HEAD, revision: 1eef9b3ae)
build user: root@7197b65efb7f
build date: 2024-04-05T20:54:07Z
go version: go1.22.1
platform: linux/amd64
tags: netgo,builtinassets,promtail_journal_enabled
az login --use-device-code
az role definition create --role-definition '{
"Name": "Metrics Reader",
"Description": "Allows read access to Azure Metrics",
"Actions": [
"Microsoft.Insights/Metrics/read",
"Microsoft.Compute/virtualMachines/read"
],
"assignableScopes": [
"/subscriptions/YOUR-SUBSCRIPTION-HERE/resourceGroups/YOUR-RESOURCE-GROUP-HERE"
]
}'
az role definition list --custom-role-only
az ad sp create-for-rbac \
--name "grafana-alloy-metrics" \
--role "Metrics Reader" \
--scopes "/subscriptions/YOUR-SUBSCRIPTION-HERE/resourceGroups/YOUR-RESOURCE-GROUP-HERE" \
--years 5 \
--json-auth
az ad sp list --display-name "grafana-alloy-metrics"
Make a note of the following 3 values, they will be used in the /etc/default/alloy
file:
tenantId
clientId
clientSecret