Skip to content

Commit

Permalink
etcdserver: rename to "heartbeat_send_failures_total"
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <[email protected]>
  • Loading branch information
gyuho committed May 23, 2018
1 parent bc59f7b commit a1aade8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions etcdserver/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ var (
Name: "leader_changes_seen_total",
Help: "The number of leader changes seen.",
})
heartbeatFailures = prometheus.NewCounter(prometheus.CounterOpts{
heartbeatSendFailures = prometheus.NewCounter(prometheus.CounterOpts{
Namespace: "etcd",
Subsystem: "server",
Name: "heartbeat_failures_total",
Help: "The total number of heartbeat send failures (likely overloaded from slow disk).",
Name: "heartbeat_send_failures_total",
Help: "The total number of leader heartbeat send failures (likely overloaded from slow disk).",
})
slowApplies = prometheus.NewCounter(prometheus.CounterOpts{
Namespace: "etcd",
Expand Down Expand Up @@ -97,7 +97,7 @@ func init() {
prometheus.MustRegister(hasLeader)
prometheus.MustRegister(isLeader)
prometheus.MustRegister(leaderChanges)
prometheus.MustRegister(heartbeatFailures)
prometheus.MustRegister(heartbeatSendFailures)
prometheus.MustRegister(slowApplies)
prometheus.MustRegister(proposalsCommitted)
prometheus.MustRegister(proposalsApplied)
Expand Down
4 changes: 2 additions & 2 deletions etcdserver/raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ func (r *raftNode) processMessages(ms []raftpb.Message) []raftpb.Message {
// TODO: limit request rate.
if r.lg != nil {
r.lg.Warn(
"failed to send out heartbeat; took too long, server is overloaded likely from slow disk",
"leader failed to send out heartbeat on time; took too long, leader is overloaded likely from slow disk",
zap.Duration("heartbeat-interval", r.heartbeat),
zap.Duration("expected-duration", 2*r.heartbeat),
zap.Duration("exceeded-duration", exceed),
Expand All @@ -377,7 +377,7 @@ func (r *raftNode) processMessages(ms []raftpb.Message) []raftpb.Message {
plog.Warningf("failed to send out heartbeat on time (exceeded the %v timeout for %v)", r.heartbeat, exceed)
plog.Warningf("server is likely overloaded")
}
heartbeatFailures.Inc()
heartbeatSendFailures.Inc()
}
}
}
Expand Down

0 comments on commit a1aade8

Please sign in to comment.