From 4c82c45ee9134200ad58b7a99008018eb079d946 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Fri, 17 Jun 2016 18:57:42 +0100 Subject: [PATCH] Adds a key metrics section to the telemetry guide. --- website/source/docs/agent/http.html.markdown | 2 +- .../source/docs/agent/telemetry.html.markdown | 135 ++++++++++++++++++ 2 files changed, 136 insertions(+), 1 deletion(-) diff --git a/website/source/docs/agent/http.html.markdown b/website/source/docs/agent/http.html.markdown index 20dfc5a54b..6ea2b03f01 100644 --- a/website/source/docs/agent/http.html.markdown +++ b/website/source/docs/agent/http.html.markdown @@ -49,7 +49,7 @@ A critical note is that the return of a blocking request is **no guarantee** of is possible that the timeout was reached or that there was an idempotent write that does not affect the result of the query. -## Consistency Modes +## Consistency Modes Most of the read query endpoints support multiple levels of consistency. Since no policy will suit all clients' needs, these consistency modes allow the user to have the ultimate say in diff --git a/website/source/docs/agent/telemetry.html.markdown b/website/source/docs/agent/telemetry.html.markdown index a71d5deb9c..da2b4f5a70 100644 --- a/website/source/docs/agent/telemetry.html.markdown +++ b/website/source/docs/agent/telemetry.html.markdown @@ -43,3 +43,138 @@ Below is sample output of a telemetry dump: [2014-01-29 10:56:50 -0800 PST][S] 'consul-agent.serf.queue.Intent': Count: 10 Sum: 0.000 [2014-01-29 10:56:50 -0800 PST][S] 'consul-agent.serf.queue.Event': Count: 10 Min: 0.000 Mean: 2.500 Max: 5.000 Stddev: 2.121 Sum: 25.000 ``` + +# Key Metrics + +When telemetry is being streamed to an external metrics store, the interval is defined to +be that store's flush interval. Otherwise, the interval can be assumed to be 10 seconds +when retrieving metrics from the built-in store using the above described signals. + +## Agent Health + +These metrics are used to monitor the health of specific Consul agents. + + + + + + + + + + + + + + + + + + + + + + + + + + +
MetricDescriptionUnitType
`consul.runtime.num_goroutines`This tracks the number of running goroutines and is a general load pressure indicator. This may burst from time to time but should return to a steady state value.number of goroutinesgauge
`consul.runtime.alloc_bytes`This measures the number of bytes allocated by the Consul process. This may burst from time to time but should return to a steady state value.bytesgauge
`consul.runtime.heap_objects`This measures the number of objects allocated on the heap and is a general memory pressure indicator. This may burst from time to time but should return to a steady state value.number of objectsgauge
+ +## Server Health + +These metrics are used to monitor the health of the Consul servers. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MetricDescriptionUnitType
`consul.raft.state.leader`This increments whenever a Consul server becomes a leader. If there are frequent leadership changes this may be indication that the servers are overloaded and aren't meeting the soft real-time requirements for Raft, or that there are networking problems between the servers.leadership transitions / intervalcounter
`consul.raft.state.candidate`This increments whenever a Consul server starts an election. If this increments without a leadership change occurring it could indicate that a single server is overloaded or is experiencing network connectivity issues.election attempts / intervalcounter
`consul.raft.apply`This counts the number of Raft transactions occurring over the interval, which is a general indicator of the write load on the Consul servers.raft transactions / intervalcounter
`consul.raft.commitTime`This measures the time it takes to commit a new entry to the Raft log on the leader.mstimer
`consul.raft.leader.dispatchLog`This measures the time it takes for the leader to write log entries to disk.mstimer
`consul.raft.replication.appendEntries`This measures the time it takes to replicate log entries to followers. This is a general indicator of the load pressure on the Consul servers, as well as the performance of the communication between the servers.mstimer
`consul.raft.leader.lastContact`This measures the time that a Consul server was last contacted by the leader (will be zero on the leader itself). This is a general indicator of latency in the Raft subsystem, and gives a general indicator of how far behind [stale](/docs/agent/http.html#consistency) queries will be.mstimer
+ +## Cluster Health + +These metrics give insight into the health of the cluster as a whole. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MetricDescriptionUnitType
`consul.memberlist.msg.suspect`This increments when an agent suspects another as failed when executing random probes as part of the gossip protocol. These can be an indicator of overloaded agents, network problems, or configuration errors where agents can not connect to each other on the [required ports](/docs/agent/options.html#ports).suspect messages received / intervalcounter
`consul.serf.member.flap`Available in Consul 0.7 and later, this increments when an agent is marked dead and then recovers within a short time period. This can be an indicator of overloaded agents, network problems, or configuration errors where agents can not connect to each other on the [required ports](/docs/agent/options.html#ports).flaps / intervalcounter
`consul.serf.events`This increments when an agent processes an [event](/docs/commands/event.html). Note that Consul uses events internally so there may be additional events showing in telemetry. There are also a per-event counters emitted as `consul.serf.events.`.events / intervalcounter
`consul.dns.domain_query.`This tracks how long it takes to service forward DNS lookups on the given Consul agent.mstimer
`consul.dns.ptr_query.`This tracks how long it takes to service reverse DNS lookups on the given Consul agent.mstimer