Hi guys, i am trying to configure “stats_sinks” so that envoy can send metrics to statsd_exporter which is already deployed in same pod with my service.
I’ve tried to customize envoy boostrap configuration according to this article(https://github.com/istio/istio/tree/master/samples/custom-bootstrap) to achieve this, but things not going right.
I applied below configmap first:
apiVersion: v1
kind: ConfigMap
metadata:
name: istio-custom-bootstrap-config
namespace: default
data:
custom_bootstrap.json: |
{
"stats_sinks": [
{
"name": "envoy.stat_sinks.statsd",
"typed_config": {
"address": {
"socket_address": {
"address": "127.0.0.1",
"port_value": "9125"
}
},
"tcp_cluster_name": "statsd-exporter",
"prefix": "productpage"
}
}
]
}
And then add an annotation to deployment:
sidecar.istio.io/bootstrapOverride: istio-custom-bootstrap-config
Then restart pod, and run kubectl exec MyPodName -c istio-proxy -- curl 127.0.0.1:15000/config_dump
to check the configuration. and there is nothing about “stats_sinks” in the configuration. I’ve also checked the log of envoy container, and i think there is no obviously errors or exceptions.
Is it something wrong in my operation? Appreciate your help, Thanks!