Update metric help to be more descriptive. (#12764)

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Co-authored-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
Derek Nola
2025-08-14 14:25:38 -07:00
committed by GitHub
parent c7b17ca158
commit 148243c495
3 changed files with 11 additions and 10 deletions

View File

@@ -9,17 +9,18 @@ import (
var (
loadbalancerConnections = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Name: version.Program + "_loadbalancer_server_connections",
Help: "Count of current connections to loadbalancer server",
Help: "Count of current connections to loadbalancer server, labeled by loadbalancer name and server address.",
}, []string{"name", "server"})
loadbalancerState = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Name: version.Program + "_loadbalancer_server_health",
Help: "Current health value of loadbalancer server",
Help: "Current health state of loadbalancer backend servers, labeled by loadbalancer name and server address. " +
"State is enum of 0=INVALID, 1=FAILED, 2=STANDBY, 3=UNCHECKED, 4=RECOVERING, 5=HEALTHY, 6=PREFERRED, 7=ACTIVE.",
}, []string{"name", "server"})
loadbalancerDials = prometheus.NewHistogramVec(prometheus.HistogramOpts{
Name: version.Program + "_loadbalancer_dial_duration_seconds",
Help: "Time taken to dial a connection to a backend server",
Help: "Time in seconds taken to dial a connection to a backend server, labeled by loadbalancer name and success/failure status.",
Buckets: metrics.ExponentialBuckets(0.001, 2, 15),
}, []string{"name", "status"})
)

View File

@@ -36,7 +36,7 @@ var (
certificateExpirationSeconds = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Name: version.Program + "_certificate_expiration_seconds",
Help: "Remaining lifetime on the certificate.",
Help: "Remaining lifetime in seconds of the certificate, labeled by certificate subject and usages.",
}, []string{"subject", "usages"})
)

View File

@@ -9,37 +9,37 @@ import (
var (
snapshotSaveCount = prometheus.NewHistogramVec(prometheus.HistogramOpts{
Name: version.Program + "_etcd_snapshot_save_duration_seconds",
Help: "Total time taken to complete the etcd snapshot process",
Help: "Total time in seconds taken to complete the etcd snapshot process, labeled by success/failure status.",
Buckets: metrics.ExponentialBuckets(0.008, 2, 15),
}, []string{"status"})
snapshotSaveLocalCount = prometheus.NewHistogramVec(prometheus.HistogramOpts{
Name: version.Program + "_etcd_snapshot_save_local_duration_seconds",
Help: "Total time taken to save a local snapshot file",
Help: "Total time in seconds taken to save a local snapshot file, labeled by success/failure status.",
Buckets: metrics.ExponentialBuckets(0.008, 2, 15),
}, []string{"status"})
snapshotSaveS3Count = prometheus.NewHistogramVec(prometheus.HistogramOpts{
Name: version.Program + "_etcd_snapshot_save_s3_duration_seconds",
Help: "Total time taken to upload a snapshot file to S3",
Help: "Total time in seconds taken to upload a snapshot file to S3, labeled by success/failure status.",
Buckets: metrics.ExponentialBuckets(0.008, 2, 15),
}, []string{"status"})
snapshotReconcileCount = prometheus.NewHistogramVec(prometheus.HistogramOpts{
Name: version.Program + "_etcd_snapshot_reconcile_duration_seconds",
Help: "Total time taken to sync the list of etcd snapshots",
Help: "Total time in seconds taken to sync the list of etcd snapshots, labeled by success/failure status.",
Buckets: metrics.ExponentialBuckets(0.008, 2, 15),
}, []string{"status"})
snapshotReconcileLocalCount = prometheus.NewHistogramVec(prometheus.HistogramOpts{
Name: version.Program + "_etcd_snapshot_reconcile_local_duration_seconds",
Help: "Total time taken to list local snapshot files",
Help: "Total time in seconds taken to list local snapshot files, labeled by success/failure status.",
Buckets: metrics.ExponentialBuckets(0.008, 2, 15),
}, []string{"status"})
snapshotReconcileS3Count = prometheus.NewHistogramVec(prometheus.HistogramOpts{
Name: version.Program + "_etcd_snapshot_reconcile_s3_duration_seconds",
Help: "Total time taken to list S3 snapshot files",
Help: "Total time in seconds taken to list S3 snapshot files, labeled by success/failure status.",
Buckets: metrics.ExponentialBuckets(0.008, 2, 15),
}, []string{"status"})
)