How webdevops/azure-keyvault-exporter works
Project type and purpose
• This is an open-source, containerized Prometheus exporter written in Go.
• Its job is to periodically scrape metadata (info & status) for secrets, keys and certificates from Azure Key Vaults and expose them over HTTP for Prometheus to ingest.
File structure
• Top-level files:
– main.go: CLI entrypoint that initializes config, logging, caching, metrics collectors, HTTP server.
– common.*.go: shared helpers for logging (“common.logger.go”) and system utilities (“common.system.go”).
– metrics.keyvault.go: metric definitions and collector logic for KeyVault entities.
– config/opts.go: parses flags & env vars into typed configuration.
• Build & CI:
– Dockerfile, .dockerignore, Makefile – container build & local workflow.
– .github/workflows/*.yaml – CI pipelines for linting, building, testing, releasing Docker images.
• Dependencies:
– go.mod / go.sum – Go modules (Azure SDK, go-common libs, Prometheus client).
– metrics.keyvault.go uses go-common’s Azure ResourceGraph tag manager, tracing, cache interfaces.
README
• Describes CLI options for Azure authentication, filtering vaults, concurrency, caching, HTTP server settings.
• Lists exported Prometheus metrics (info & status per vault / secret / key / cert).
• Points to go-common docs for tag management, tracing metrics, caching.