This PR refactors cmd/unused-exporter in several ways, providing better readability, logging, and metrics. The most important change are in exposed metrics and their labels:
unused_disks_count: How many unused disks are in this provider (gauge)
unused_provider_duration_ms How long in milliseconds took to fetch this provider information (gauge)
unused_provider_info CSP information (static gauge)
unused_provider_success Static metric indicating if collecting the metrics succeeded or not (gauge, 0 or 1)
All metrics have the same 2 labels, provider and provider_id, with the exception of unused_disks_count: this ones contains additionally a k8s_namespace label.
This PR refactors
cmd/unused-exporter
in several ways, providing better readability, logging, and metrics. The most important change are in exposed metrics and their labels:unused_disks_count
: How many unused disks are in this provider (gauge)unused_provider_duration_ms
How long in milliseconds took to fetch this provider information (gauge)unused_provider_info
CSP information (static gauge)unused_provider_success
Static metric indicating if collecting the metrics succeeded or not (gauge, 0 or 1)All metrics have the same 2 labels,
provider
andprovider_id
, with the exception ofunused_disks_count
: this ones contains additionally ak8s_namespace
label.