Envoy is an open-source edge and service proxy designed for cloud-native applications. It is used to manage network traffic, providing features like load balancing, service discovery, and observability. One of its key functionalities is exporting metrics, which are crucial for monitoring and performance analysis.
The symptom observed in this scenario is that Envoy is not exporting metrics as expected. This can manifest as missing data in your monitoring system, such as Prometheus, or an inability to access metrics endpoints directly.
The root cause of metrics not being exported often lies in configuration errors or network connectivity issues. Envoy requires proper configuration to expose metrics endpoints, and any misconfiguration can lead to metrics not being available. Additionally, network issues can prevent the monitoring system from reaching Envoy's metrics endpoint.
Incorrect settings in the Envoy configuration file can prevent metrics from being exported. This includes incorrect paths, ports, or missing configurations for stats sinks.
Network firewalls or routing issues can block access to the metrics endpoint, preventing data from being collected by monitoring systems.
To resolve the issue of metrics not being exported, follow these steps:
Check the Envoy configuration file to ensure that the metrics endpoint is correctly configured. Look for the admin
section and ensure it includes a valid access_log_path
and address
:
{
"admin": {
"access_log_path": "/tmp/admin_access.log",
"address": {
"socket_address": {
"address": "0.0.0.0",
"port_value": 9901
}
}
}
}
Ensure that the stats_sinks
are properly configured if using a monitoring system like Prometheus.
Ensure that there are no network issues preventing access to the metrics endpoint. You can use tools like curl
to test connectivity:
curl http://localhost:9901/stats
If you encounter connectivity issues, check firewall settings and network routes.
Ensure that your monitoring system is configured to scrape metrics from the correct endpoint. For Prometheus, verify the prometheus.yml
configuration:
scrape_configs:
- job_name: 'envoy'
static_configs:
- targets: ['localhost:9901']
For more detailed information on Envoy configuration, visit the Envoy Configuration Overview. To learn more about monitoring with Prometheus, check out the Prometheus Documentation.
Let Dr. Droid create custom investigation plans for your infrastructure.
Book Demo