Skip to content

Commit

Permalink
fix: revert ok value for masterCkquorum
Browse files Browse the repository at this point in the history
  • Loading branch information
om-goto committed Aug 25, 2022
1 parent 9feae49 commit beece9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exporter/sentinels.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ func (e *Exporter) extractSentinelMetrics(ch chan<- prometheus.Metric, c redis.C

masterCkquorum, err := redis.String(doRedisCmd(c, "SENTINEL", "CKQUORUM", masterName))
log.Debugf("Sentinel ckquorum status for master %s: %s %s", masterName, masterCkquorum, err)
masterCkquorumStatus := 0
masterCkquorumStatus := 1
masterCkquorumMsg := masterCkquorum
if err != nil {
masterCkquorumStatus = 1
masterCkquorumStatus = 0
masterCkquorumMsg = err.Error()
}
e.registerConstMetricGauge(ch, "sentinel_master_ckquorum_status", float64(masterCkquorumStatus), masterName, masterCkquorumMsg)
Expand Down

0 comments on commit beece9d

Please sign in to comment.