Skip to content

Commit

Permalink
backport of commit 6e3ceb0
Browse files Browse the repository at this point in the history
  • Loading branch information
nickethier committed May 30, 2023
1 parent 910fbbc commit e948fd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion agent/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,10 @@ func getPrometheusDefs(cfg *config.RuntimeConfig, isServer bool) ([]prometheus.G
Gauges,
raftGauges,
serverGauges,
hoststats.Gauges,
}

if cfg.Telemetry.EnableHostMetrics {
gauges = append(gauges, hoststats.Gauges)
}

// TODO(ffmmm): conditionally add only leader specific metrics to gauges, counters, summaries, etc
Expand Down
3 changes: 2 additions & 1 deletion website/content/docs/agent/telemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,8 @@ Consul attaches the following labels to metric values.

## Server Host Metrics

Consul servers report the following metrics about the host's system resources.
Consul servers can report the following metrics about the host's system resources.
This feature must be enabled in the [agent telemetry configuration](/consul/docs/agent/config/config-files#telemetry-enable_host_metrics).
Note that if the Consul server is operating inside a container these metrics
still report host resource usage and do not report any resource limits placed
on the container.
Expand Down

0 comments on commit e948fd2

Please sign in to comment.