Comments (8)
23.6.0
released with workload identity support
from azure-resourcemanager-exporter.
working on a new release
from azure-resourcemanager-exporter.
please try webdevops/azure-resourcemanager-exporter:main
from azure-resourcemanager-exporter.
Thanks a lot @mblaschke, it works like a charm. Patiently waiting for the official release.
One thing worth noting is that with Managed Identity on AKS cluster, the first scrape could fail (all subsequent scrapes are fine) with below error log (IMDS token request timed out):
2022-09-28T10:46:59.165161333Z {"file":"/go/src/github.com/webdevops/azure-resourcemanager-exporter/main.go:65","func":"main.main","level":"info","msg":"starting http server on 0.0.0.0:8080"}
2022-09-28T10:46:59.165165633Z {"collector":"GraphApps","file":"/go/pkg/mod/github.com/webdevops/[email protected]/prometheus/collector/collector.go:172","func":"collector.(*Collector).collectionStart","level":"info","msg":"starting metrics collection"}
2022-09-28T10:47:00.156569240Z {"collector":"GraphApps","file":"/go/src/github.com/webdevops/azure-resourcemanager-exporter/metrics_graph_apps.go:69","func":"main.(*MetricsCollectorGraphApps).Collect","level":"panic","msg":"DefaultAzureCredential: failed to acquire a token.\nAttempted credentials:\n\tEnvironmentCredential: missing environment variable AZURE_TENANT_ID\n\tManagedIdentityCredential: IMDS token request timed out\n\tAzureCLICredential: fork/exec /bin/sh: no such file or directory"}
2022-09-28T10:47:00.156619941Z {"collector":"GraphApps","file":"/go/pkg/mod/github.com/webdevops/[email protected]/prometheus/collector/collector.go:130","func":"collector.(*Collector).collect.func1.1","level":"error","msg":"panic occurred (panic threshold 1 of 5): DefaultAzureCredential: failed to acquire a token.\nAttempted credentials:\n\tEnvironmentCredential: missing environment variable AZURE_TENANT_ID\n\tManagedIdentityCredential: IMDS token request timed out\n\tAzureCLICredential: fork/exec /bin/sh: no such file or directory"}
2022-09-28T10:47:00.156635241Z {"collector":"GraphApps","duration":1.000991064,"file":"/go/pkg/mod/github.com/webdevops/[email protected]/prometheus/collector/collector.go:182","func":"collector.(*Collector).collectionFinish","level":"info","msg":"finished metrics collection"}
2022-09-28T10:49:00.157199560Z {"collector":"GraphApps","file":"/go/pkg/mod/github.com/webdevops/[email protected]/prometheus/collector/collector.go:172","func":"collector.(*Collector).collectionStart","level":"info","msg":"starting metrics collection"}
2022-09-28T10:49:00.511749569Z {"collector":"GraphApps","duration":0.35457381,"file":"/go/pkg/mod/github.com/webdevops/[email protected]/prometheus/collector/collector.go:182","func":"collector.(*Collector).collectionFinish","level":"info","msg":"finished metrics collection"}
2022-09-28T10:51:00.512476397Z {"collector":"GraphApps","file":"/go/pkg/mod/github.com/webdevops/[email protected]/prometheus/collector/collector.go:172","func":"collector.(*Collector).collectionStart","level":"info","msg":"starting metrics collection"}
2022-09-28T10:51:00.656298987Z {"collector":"GraphApps","duration":0.144378199,"file":"/go/pkg/mod/github.com/webdevops/[email protected]/prometheus/collector/collector.go:182","func":"collector.(*Collector).collectionFinish","level":"info","msg":"finished metrics collection"}
It can be avoided by adding to the pod an initContainer with a delay (e.g. 5 seconds).
(see Azure/aad-pod-identity#992)
2022-09-28T10:52:40.455113835Z {"file":"/go/src/github.com/webdevops/azure-resourcemanager-exporter/main.go:65","func":"main.main","level":"info","msg":"starting http server on 0.0.0.0:8080"}
2022-09-28T10:52:40.455285945Z {"collector":"GraphApps","file":"/go/pkg/mod/github.com/webdevops/[email protected]/prometheus/collector/collector.go:172","func":"collector.(*Collector).collectionStart","level":"info","msg":"starting metrics collection"}
2022-09-28T10:52:40.669964387Z {"collector":"GraphApps","duration":0.214674741,"file":"/go/pkg/mod/github.com/webdevops/[email protected]/prometheus/collector/collector.go:182","func":"collector.(*Collector).collectionFinish","level":"info","msg":"finished metrics collection"}
2022-09-28T10:54:40.670674096Z {"collector":"GraphApps","file":"/go/pkg/mod/github.com/webdevops/[email protected]/prometheus/collector/collector.go:172","func":"collector.(*Collector).collectionStart","level":"info","msg":"starting metrics collection"}
2022-09-28T10:54:40.802757687Z {"collector":"GraphApps","duration":0.13204079,"file":"/go/pkg/mod/github.com/webdevops/[email protected]/prometheus/collector/collector.go:182","func":"collector.(*Collector).collectionFinish","level":"info","msg":"finished metrics collection"}
2022-09-28T10:56:40.803182200Z {"collector":"GraphApps","file":"/go/pkg/mod/github.com/webdevops/[email protected]/prometheus/collector/collector.go:172","func":"collector.(*Collector).collectionStart","level":"info","msg":"starting metrics collection"}
2022-09-28T10:56:40.936933704Z {"collector":"GraphApps","duration":0.134056515,"file":"/go/pkg/mod/github.com/webdevops/[email protected]/prometheus/collector/collector.go:182","func":"collector.(*Collector).collectionFinish","level":"info","msg":"finished metrics collection"}
from azure-resourcemanager-exporter.
are you using aad-pod-identity or azure workload identity?
from azure-resourcemanager-exporter.
aad-pod-identity 1.8.5 deployed using helm chart 4.1.6
from azure-resourcemanager-exporter.
What configuration did you use here? I've successfully configured azure workload identity for other pods but I cannot get this one working.
EDIT: got it working.
For the sake of others, here's my values file for the helm chart that made this work (you have to have setup your workload identity etc first) - this is for use in by terraform templatefile
function.
image:
# See https://github.com/webdevops/azure-resourcemanager-exporter/issues/18
tag: main
secrets:
AZURE_SUBSCRIPTION_ID: "${join(" ", subscription_ids)}"
serviceAccount:
name: "${service_account_name}"
labels:
azure.workload.identity/use: "true"
annotations:
azure.workload.identity/client-id: "${client_id}"
azure.workload.identity/tenant-id: "${tenant_id}"
azure.workload.identity/service-account-token-expiration: "86400"
podLabels:
azure.workload.identity/use: "true"
from azure-resourcemanager-exporter.
@megakid
tag :23.3.0-beta1
should give you workload identity support but keep in mind that this part of the azure-sdk-for-go
is still in beta and they won't release it until AKS workload identity support is GA.
from azure-resourcemanager-exporter.
Related Issues (20)
- Cost Export limited to 1000 entries HOT 2
- Cost per resource HOT 1
- Grafana billing dashboard HOT 3
- Fix costs parameters in cli help HOT 7
- Clear cache if invalid HOT 1
- Cost metrics always reporting SubscriptionName with `Unassigned(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)` HOT 4
- Added startupProbe endpoint to minimize metrics gaps HOT 3
- 23.3.0-beta4: unable to parse Azure resourceID
- Add scrape time metrics
- azure-resourcemanager-expo crash when resource tag contain "-" in the name HOT 3
- Trying to use latest version. HOT 3
- Is there a way we configure a custom metric? HOT 2
- Next stable release? HOT 5
- panic: inconsistent label cardinality: HOT 12
- Public container crashes looking for --config file HOT 7
- How to get api ratelimit write/delete operations. HOT 2
- High CPU load when general.scrapeTime is set to 0 in version 23.6.0
- Do not panic on AzureRM Errors HOT 2
- How do I make the costs queries in this new version? HOT 5
- Fine grained permissions for this exporter HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-resourcemanager-exporter.