Remove Reported Metrics of Istio Sidecar

1.1k views Asked by At

I use Istio 1.8 for service mesh and Prometheus to collect metrics from sidecards. Currently these metrics are been provided by sidecards:

istio_request_bytes_bucket  
istio_request_duration_milliseconds_bucket  
istio_requests_total    
envoy_cluster_upstream_cx_connect_ms_bucket 
istio_request_messages_total    
istio_response_messages_total   
envoy_cluster_upstream_cx_length_ms_bucket  
istio_response_bytes_bucket 
istio_request_bytes_sum 
istio_request_bytes_count

This amount of metrics use lots of network bandwidth. (We have around 5k pods)

All we need for now are istio_requests_total and istio_request_duration_milliseconds_bucket only from Inbound. I know how to remove labels by EnvoyFilter but I was unable to find documentation for removing a metric.

2

There are 2 answers

0
Peter Claes On

Here you can find the info regarding customizing Istio (1.8) metrics :

https://istio.io/v1.8/docs/tasks/observability/metrics/customize-metrics/

0
mario On

For better visibility I'm posting my comment as a Community Wiki answer as it is only the extension of what Peter Claes already mentioned in his answer.

According to the Istio docs:

The metrics section provides values for the metric dimensions as expressions, and allows you to remove or override the existing metric dimensions. You can modify the standard metric definitions using tags_to_remove or by re-defining a dimension. These configuration settings are also exposed as istioctl installation options, which allow you to customize different metrics for gateways and sidecars as well as for the inbound or outbound direction.