Skip to content

Commit 148243c

Browse files
dereknolabrandond
andauthored
Update metric help to be more descriptive. (#12764)
Signed-off-by: Brad Davidson <[email protected]> Co-authored-by: Brad Davidson <[email protected]>
1 parent c7b17ca commit 148243c

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

pkg/agent/loadbalancer/metrics.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@ import (
99
var (
1010
loadbalancerConnections = prometheus.NewGaugeVec(prometheus.GaugeOpts{
1111
Name: version.Program + "_loadbalancer_server_connections",
12-
Help: "Count of current connections to loadbalancer server",
12+
Help: "Count of current connections to loadbalancer server, labeled by loadbalancer name and server address.",
1313
}, []string{"name", "server"})
1414

1515
loadbalancerState = prometheus.NewGaugeVec(prometheus.GaugeOpts{
1616
Name: version.Program + "_loadbalancer_server_health",
17-
Help: "Current health value of loadbalancer server",
17+
Help: "Current health state of loadbalancer backend servers, labeled by loadbalancer name and server address. " +
18+
"State is enum of 0=INVALID, 1=FAILED, 2=STANDBY, 3=UNCHECKED, 4=RECOVERING, 5=HEALTHY, 6=PREFERRED, 7=ACTIVE.",
1819
}, []string{"name", "server"})
1920

2021
loadbalancerDials = prometheus.NewHistogramVec(prometheus.HistogramOpts{
2122
Name: version.Program + "_loadbalancer_dial_duration_seconds",
22-
Help: "Time taken to dial a connection to a backend server",
23+
Help: "Time in seconds taken to dial a connection to a backend server, labeled by loadbalancer name and success/failure status.",
2324
Buckets: metrics.ExponentialBuckets(0.001, 2, 15),
2425
}, []string{"name", "status"})
2526
)

pkg/certmonitor/certmonitor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var (
3636

3737
certificateExpirationSeconds = prometheus.NewGaugeVec(prometheus.GaugeOpts{
3838
Name: version.Program + "_certificate_expiration_seconds",
39-
Help: "Remaining lifetime on the certificate.",
39+
Help: "Remaining lifetime in seconds of the certificate, labeled by certificate subject and usages.",
4040
}, []string{"subject", "usages"})
4141
)
4242

pkg/etcd/snapshot_metrics.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,37 @@ import (
99
var (
1010
snapshotSaveCount = prometheus.NewHistogramVec(prometheus.HistogramOpts{
1111
Name: version.Program + "_etcd_snapshot_save_duration_seconds",
12-
Help: "Total time taken to complete the etcd snapshot process",
12+
Help: "Total time in seconds taken to complete the etcd snapshot process, labeled by success/failure status.",
1313
Buckets: metrics.ExponentialBuckets(0.008, 2, 15),
1414
}, []string{"status"})
1515

1616
snapshotSaveLocalCount = prometheus.NewHistogramVec(prometheus.HistogramOpts{
1717
Name: version.Program + "_etcd_snapshot_save_local_duration_seconds",
18-
Help: "Total time taken to save a local snapshot file",
18+
Help: "Total time in seconds taken to save a local snapshot file, labeled by success/failure status.",
1919
Buckets: metrics.ExponentialBuckets(0.008, 2, 15),
2020
}, []string{"status"})
2121

2222
snapshotSaveS3Count = prometheus.NewHistogramVec(prometheus.HistogramOpts{
2323
Name: version.Program + "_etcd_snapshot_save_s3_duration_seconds",
24-
Help: "Total time taken to upload a snapshot file to S3",
24+
Help: "Total time in seconds taken to upload a snapshot file to S3, labeled by success/failure status.",
2525
Buckets: metrics.ExponentialBuckets(0.008, 2, 15),
2626
}, []string{"status"})
2727

2828
snapshotReconcileCount = prometheus.NewHistogramVec(prometheus.HistogramOpts{
2929
Name: version.Program + "_etcd_snapshot_reconcile_duration_seconds",
30-
Help: "Total time taken to sync the list of etcd snapshots",
30+
Help: "Total time in seconds taken to sync the list of etcd snapshots, labeled by success/failure status.",
3131
Buckets: metrics.ExponentialBuckets(0.008, 2, 15),
3232
}, []string{"status"})
3333

3434
snapshotReconcileLocalCount = prometheus.NewHistogramVec(prometheus.HistogramOpts{
3535
Name: version.Program + "_etcd_snapshot_reconcile_local_duration_seconds",
36-
Help: "Total time taken to list local snapshot files",
36+
Help: "Total time in seconds taken to list local snapshot files, labeled by success/failure status.",
3737
Buckets: metrics.ExponentialBuckets(0.008, 2, 15),
3838
}, []string{"status"})
3939

4040
snapshotReconcileS3Count = prometheus.NewHistogramVec(prometheus.HistogramOpts{
4141
Name: version.Program + "_etcd_snapshot_reconcile_s3_duration_seconds",
42-
Help: "Total time taken to list S3 snapshot files",
42+
Help: "Total time in seconds taken to list S3 snapshot files, labeled by success/failure status.",
4343
Buckets: metrics.ExponentialBuckets(0.008, 2, 15),
4444
}, []string{"status"})
4545
)

0 commit comments

Comments
 (0)