open-consul/website/content/commands
Ashvitha f514182f3e
Allow HCP metrics collection for Envoy proxies
Co-authored-by: Ashvitha Sridharan <ashvitha.sridharan@hashicorp.com>
Co-authored-by: Freddy <freddygv@users.noreply.github.com>

Add a new envoy flag: "envoy_hcp_metrics_bind_socket_dir", a directory
where a unix socket will be created with the name
`<namespace>_<proxy_id>.sock` to forward Envoy metrics.

If set, this will configure:
- In bootstrap configuration a local stats_sink and static cluster.
  These will forward metrics to a loopback listener sent over xDS.

- A dynamic listener listening at the socket path that the previously
  defined static cluster is sending metrics to.

- A dynamic cluster that will forward traffic received at this listener
  to the hcp-metrics-collector service.


Reasons for having a static cluster pointing at a dynamic listener:
- We want to secure the metrics stream using TLS, but the stats sink can
  only be defined in bootstrap config. With dynamic listeners/clusters
  we can use the proxy's leaf certificate issued by the Connect CA,
  which isn't available at bootstrap time.

- We want to intelligently route to the HCP collector. Configuring its
  addreess at bootstrap time limits our flexibility routing-wise. More
  on this below.

Reasons for defining the collector as an upstream in `proxycfg`:
- The HCP collector will be deployed as a mesh service.

- Certificate management is taken care of, as mentioned above.

- Service discovery and routing logic is automatically taken care of,
  meaning that no code changes are required in the xds package.

- Custom routing rules can be added for the collector using discovery
  chain config entries. Initially the collector is expected to be
  deployed to each admin partition, but in the future could be deployed
  centrally in the default partition. These config entries could even be
  managed by HCP itself.
2023-03-10 13:52:54 -07:00
..
acl Improve ux around ACL token to help users avoid overwriting node/service identities (#16506) 2023-03-06 15:00:39 +00:00
catalog docs: CLI page descriptions for automated checker (#16056) 2023-01-26 12:42:13 -06:00
config docs: CLI page descriptions for automated checker (#16056) 2023-01-26 12:42:13 -06:00
connect Allow HCP metrics collection for Envoy proxies 2023-03-10 13:52:54 -07:00
intention docs: CLI page descriptions for automated checker (#16056) 2023-01-26 12:42:13 -06:00
kv docs: CLI page descriptions for automated checker (#16056) 2023-01-26 12:42:13 -06:00
namespace docs: CLI page descriptions for automated checker (#16056) 2023-01-26 12:42:13 -06:00
operator Add docs for usage endpoint and command (#16258) 2023-02-22 12:36:25 -08:00
peering docs: CLI page descriptions for automated checker (#16056) 2023-01-26 12:42:13 -06:00
services Docs/services refactor docs day 122022 (#16103) 2023-02-28 14:09:56 -08:00
snapshot docs: CLI page descriptions for automated checker (#16056) 2023-01-26 12:42:13 -06:00
tls Update docs for tls commands (#16077) 2023-01-30 17:26:56 +00:00
troubleshoot Troubleshoot service to service comms (#16385) 2023-02-23 11:57:12 -06:00
agent.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00
debug.mdx docs: CLI page descriptions for automated checker (#16056) 2023-01-26 12:42:13 -06:00
event.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00
exec.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00
force-leave.mdx docs: update redirected links (#16179) 2023-02-07 10:36:32 -06:00
index.mdx new docs for consul and consul-k8s troubleshoot command (#16284) 2023-02-17 13:25:49 -08:00
info.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00
join.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00
keygen.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00
keyring.mdx docs: CLI page descriptions for automated checker (#16056) 2023-01-26 12:42:13 -06:00
leave.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00
license.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00
lock.mdx docs: update redirected links (#16179) 2023-02-07 10:36:32 -06:00
login.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00
logout.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00
maint.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00
members.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00
monitor.mdx docs: show CLI cmd-specific opts before general opts 2022-07-27 15:50:51 -07:00
partition.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00
reload.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00
rtt.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00
validate.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00
version.mdx docs: show CLI cmd-specific opts before general opts 2022-07-27 15:50:51 -07:00
watch.mdx docs: Migrate link formats (#15976) 2023-01-25 08:52:43 -08:00