Skip to content

Commit 146eb6f

Browse files
committed
Update metrics.HintStats.TotalHintsInProgress to a Guage
1 parent 42a6b8b commit 146eb6f

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

jolokia/client.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,7 @@ func (c *jolokiaClient) HintStats() (HintStats, error) {
455455
attributes := extractAttributes(string(key))
456456
switch attributes["name"] {
457457
case "TotalHintsInProgress":
458-
// PreparedStatementsEvicted
459-
stats.TotalHintsInProgress = Counter(val.Get("Count").GetInt64())
458+
stats.TotalHintsInProgress = Gauge(val.Get("Count").GetInt64())
460459
case "TotalHints":
461460
stats.TotalHints = Counter(val.Get("Count").GetInt64())
462461
}

jolokia/jolokia.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,6 @@ type StorageStats struct {
196196
// HintStats embeds information gathered from the Storage metric in
197197
// cassandra such as the number of total hints and hints being handed off
198198
type HintStats struct {
199-
TotalHintsInProgress Counter
199+
TotalHintsInProgress Gauge
200200
TotalHints Counter
201201
}

server/collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ func addHintStats(metrics ScrapedMetrics, ch chan<- prometheus.Metric) {
410410
}
411411

412412
ch <- prometheus.MustNewConstMetric(PromTotalHintsInProgress,
413-
prometheus.CounterValue, float64(metrics.HintStats.TotalHintsInProgress))
413+
prometheus.GaugeValue, float64(metrics.HintStats.TotalHintsInProgress))
414414
ch <- prometheus.MustNewConstMetric(PromTotalHints,
415415
prometheus.CounterValue, float64(metrics.HintStats.TotalHints))
416416
}

0 commit comments

Comments
 (0)