From 2282fe1ea88eaeb192094d619d7f32ad47c00f88 Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Mon, 17 Jun 2019 15:51:31 -0500 Subject: [PATCH] Changed name of metric --- nomad/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nomad/server.go b/nomad/server.go index 2700ed3fe..21c02f26a 100644 --- a/nomad/server.go +++ b/nomad/server.go @@ -1454,13 +1454,13 @@ func (s *Server) Stats() map[string]map[string]string { return stats } -// EmitRaftStats is used to export metrics about the blocked eval tracker while enabled +// EmitRaftStats is used to export metrics about raft indexes and state store snapshot index func (s *Server) EmitRaftStats(period time.Duration, stopCh <-chan struct{}) { for { select { case <-time.After(period): - commitIndex := s.raft.LastIndex() - metrics.SetGauge([]string{"raft", "commitIndex"}, float32(commitIndex)) + lastIndex := s.raft.LastIndex() + metrics.SetGauge([]string{"raft", "lastIndex"}, float32(lastIndex)) appliedIndex := s.raft.AppliedIndex() metrics.SetGauge([]string{"raft", "appliedIndex"}, float32(appliedIndex)) stateStoreSnapshotIndex, err := s.State().LatestIndex()