add missing descriptions for metrics

This commit is contained in:
Hans Hasselberg 2020-11-23 22:06:30 +01:00
parent 7a8844ccce
commit 25f9e232af
4 changed files with 24 additions and 14 deletions

10
agent/cache/cache.go vendored
View File

@ -37,7 +37,7 @@ import (
var Gauges = []prometheus.GaugeDefinition{ var Gauges = []prometheus.GaugeDefinition{
{ {
Name: []string{"consul", "cache", "entries_count"}, Name: []string{"consul", "cache", "entries_count"},
Help: "", Help: "Represents the number of entries in this cache.",
}, },
} }
@ -45,19 +45,19 @@ var Gauges = []prometheus.GaugeDefinition{
var Counters = []prometheus.CounterDefinition{ var Counters = []prometheus.CounterDefinition{
{ {
Name: []string{"consul", "cache", "bypass"}, Name: []string{"consul", "cache", "bypass"},
Help: "", Help: "Counts how many times a request bypassed the cache because no cache-key was provided.",
}, },
{ {
Name: []string{"consul", "cache", "fetch_success"}, Name: []string{"consul", "cache", "fetch_success"},
Help: "", Help: "Counts the number of successful fetches by the cache.",
}, },
{ {
Name: []string{"consul", "cache", "fetch_error"}, Name: []string{"consul", "cache", "fetch_error"},
Help: "", Help: "Counts the number of failed fetches by the cache.",
}, },
{ {
Name: []string{"consul", "cache", "evict_expired"}, Name: []string{"consul", "cache", "evict_expired"},
Help: "", Help: "Counts the number of expired entries that are evicted.",
}, },
} }

View File

@ -25,7 +25,7 @@ var CatalogCounters = []prometheus.CounterDefinition{
}, },
{ {
Name: []string{"catalog", "connect", "query"}, Name: []string{"catalog", "connect", "query"},
Help: "", Help: "Increments for each connect-based catalog query for the given service.",
}, },
{ {
Name: []string{"catalog", "service", "query-tag"}, Name: []string{"catalog", "service", "query-tag"},
@ -33,7 +33,7 @@ var CatalogCounters = []prometheus.CounterDefinition{
}, },
{ {
Name: []string{"catalog", "connect", "query-tag"}, Name: []string{"catalog", "connect", "query-tag"},
Help: "", Help: "Increments for each connect-based catalog query for the given service with the given tag.",
}, },
{ {
Name: []string{"catalog", "service", "query-tags"}, Name: []string{"catalog", "service", "query-tags"},
@ -41,7 +41,7 @@ var CatalogCounters = []prometheus.CounterDefinition{
}, },
{ {
Name: []string{"catalog", "connect", "query-tags"}, Name: []string{"catalog", "connect", "query-tags"},
Help: "", Help: "Increments for each connect-based catalog query for the given service with the given tags.",
}, },
{ {
Name: []string{"catalog", "service", "not-found"}, Name: []string{"catalog", "service", "not-found"},
@ -49,7 +49,7 @@ var CatalogCounters = []prometheus.CounterDefinition{
}, },
{ {
Name: []string{"catalog", "connect", "not-found"}, Name: []string{"catalog", "connect", "not-found"},
Help: "", Help: "Increments for each connect-based catalog query where the given service could not be found.",
}, },
} }

View File

@ -16,11 +16,11 @@ var SessionGauges = []prometheus.GaugeDefinition{
}, },
{ {
Name: []string{"raft", "applied_index"}, Name: []string{"raft", "applied_index"},
Help: "", Help: "Represents the raft applied index.",
}, },
{ {
Name: []string{"raft", "last_index"}, Name: []string{"raft", "last_index"},
Help: "", Help: "Represents the raft last index.",
}, },
} }
@ -153,7 +153,7 @@ func (s *Server) clearAllSessionTimers() {
s.sessionTimers.StopAll() s.sessionTimers.StopAll()
} }
// updateMetrics is a long running routine used to uddate a // updateMetrics is a long running routine used to update a
// number of server periodic metrics // number of server periodic metrics
func (s *Server) updateMetrics() { func (s *Server) updateMetrics() {
for { for {

View File

@ -196,6 +196,10 @@ These metrics are used to monitor the health of the Consul servers.
| `consul.acl.ResolveTokenToIdentity` | This measures the time it takes to resolve an ACL token to an Identity. | ms | timer | | `consul.acl.ResolveTokenToIdentity` | This measures the time it takes to resolve an ACL token to an Identity. | ms | timer |
| `consul.acl.token.cache_hit` | Increments if Consul is able to resolve a token's identity, or a legacy token, from the cache. | cache read op | counter | | `consul.acl.token.cache_hit` | Increments if Consul is able to resolve a token's identity, or a legacy token, from the cache. | cache read op | counter |
| `consul.acl.token.cache_miss` | Increments if Consul cannot resolve a token's identity, or a legacy token, from the cache. | cache read op | counter | | `consul.acl.token.cache_miss` | Increments if Consul cannot resolve a token's identity, or a legacy token, from the cache. | cache read op | counter |
| `consul.cache.bypass` | Counts how many times a request bypassed the cache because no cache-key was provided. | counter | counter |
| `consul.cache.fetch_success` | Counts the number of successful fetches by the cache. | counter | counter |
| `consul.cache.fetch_error` | Counts the number of failed fetches by the cache. | counter | counter |
| `consul.cache.evict_expired` | Counts the number of expired entries that are evicted. | counter | counter |
| `consul.raft.fsm.snapshot` | This metric measures the time taken by the FSM to record the current state for the snapshot. | ms | timer | | `consul.raft.fsm.snapshot` | This metric measures the time taken by the FSM to record the current state for the snapshot. | ms | timer |
| `consul.raft.fsm.apply` | This metric gives the number of logs committed since the last interval. | commit logs / interval | counter | | `consul.raft.fsm.apply` | This metric gives the number of logs committed since the last interval. | commit logs / interval | counter |
| `consul.raft.commitNumLogs` | This metric measures the count of logs processed for application to the FSM in a single batch. | logs | gauge | | `consul.raft.commitNumLogs` | This metric measures the count of logs processed for application to the FSM in a single batch. | logs | gauge |
@ -207,6 +211,8 @@ These metrics are used to monitor the health of the Consul servers.
| `consul.raft.replication.heartbeat` | This metric measures the time taken to invoke appendEntries on a peer, so that it doesnt timeout on a periodic basis. | ms | timer | | `consul.raft.replication.heartbeat` | This metric measures the time taken to invoke appendEntries on a peer, so that it doesnt timeout on a periodic basis. | ms | timer |
| `consul.serf.snapshot.appendLine` | This metric measures the time taken by the Consul agent to append an entry into the existing log. | ms | timer | | `consul.serf.snapshot.appendLine` | This metric measures the time taken by the Consul agent to append an entry into the existing log. | ms | timer |
| `consul.serf.snapshot.compact` | This metric measures the time taken by the Consul agent to compact a log. This operation occurs only when the snapshot becomes large enough to justify the compaction . | ms | timer | | `consul.serf.snapshot.compact` | This metric measures the time taken by the Consul agent to compact a log. This operation occurs only when the snapshot becomes large enough to justify the compaction . | ms | timer |
| `consul.raft.applied_index` | Represents the raft applied index. | index | gauge |
| `consul.raft.last_index` | Represents the raft applied index. | index | gauge |
| `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 / interval | counter | | `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 / interval | counter |
| `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 / interval | counter | | `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 / interval | counter |
| `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 / interval | counter | | `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 / interval | counter |
@ -314,6 +320,10 @@ These metrics give insight into the health of the cluster as a whole.
| `consul.catalog.service.query-tag..` | This increments for each catalog query for the given service with the given tag. | queries | counter | | `consul.catalog.service.query-tag..` | This increments for each catalog query for the given service with the given tag. | queries | counter |
| `consul.catalog.service.query-tags..` | This increments for each catalog query for the given service with the given tags. | queries | counter | | `consul.catalog.service.query-tags..` | This increments for each catalog query for the given service with the given tags. | queries | counter |
| `consul.catalog.service.not-found.` | This increments for each catalog query where the given service could not be found. | queries | counter | | `consul.catalog.service.not-found.` | This increments for each catalog query where the given service could not be found. | queries | counter |
| `consul.catalog.connect.query.` | This increments for each connect-based catalog query for the given service. | queries | counter |
| `consul.catalog.connect.query-tag..` | This increments for each connect-based catalog query for the given service with the given tag. | queries | counter |
| `consul.catalog.connect.query-tags..` | This increments for each connect-based catalog query for the given service with the given tags. | queries | counter |
| `consul.catalog.connect.not-found.` | This increments for each connect-based catalog query where the given service could not be found. | queries | counter |
## Connect Built-in Proxy Metrics ## Connect Built-in Proxy Metrics