Envoy is a cloud-native high-performance proxy and a recognized CNCF project.
You can send Envoy metrics to Logz.io using Metricbeat.
Please note that the following configuration needs to be performed on all relevant Envoy client nodes.
Metricbeat setup
Before you begin, you’ll need:
- Metricbeat 7.6 or higher.
- Check that Envoy’s metrics are available at http://localhost:19000/stats?format=prometheus
Download the Logz.io public certificate to your Filebeat server
For HTTPS shipping, download the Logz.io public certificate to your certificate authority folder.
sudo curl https://raw.githubusercontent.com/logzio/public-certificates/master/AAACertificateServices.crt --create-dirs -o /etc/pki/tls/certs/COMODORSADomainValidationSecureServerCA.crt
Add Prometheus module configuration
Open the Metricbeat configuration file (<<PATH_TO_METRICBEAT>>/metricbeat.yml
) with your preferred text editor.
Copy and paste the code block below, overwriting the previous contents, to replace the general configuration with the following settings:
metricbeat.modules:
- module: prometheus
period: 10s
hosts: ["localhost:19000"]
metrics_path: /stats
query:
format: prometheus
Add Logzio fields
Still in the same configuration file, copy and paste the code block below to set Logzio required fields:
# ===== General =====
fields:
logzio_codec: json
token: <<METRICS-SHIPPING-TOKEN>>
fields_under_root: true
Replace <<METRICS-SHIPPING-TOKEN>>
with a token for the Metrics account you want to ship to.
Here’s how to look up your Metrics token.
Set Logz.io as the output
Still in the same configuration file, check if Logz.io is already an output. If not, add it now.
# ===== Outputs =====
output.logstash:
hosts: ["<<LISTENER-HOST>>:5015"]
ssl.certificate_authorities: ['/etc/pki/tls/certs/COMODORSADomainValidationSecureServerCA.crt']
Replace <<LISTENER-HOST>>
with your region’s listener host (for example, listener.logz.io
). For more information on finding your account’s region, see Account region.
One last validation - make sure Logz.io is the only output and appears only once. If the file has other outputs, remove them.
The final file should look like this:
metricbeat.modules:
- module: prometheus
period: 10s
hosts: ["localhost:19000"]
metrics_path: /stats
query:
format: prometheus
fields:
logzio_codec: json
token: <<METRICS-SHIPPING-TOKEN>>
fields_under_root: true
ignore_older: 3hr
type: metrics
output.logstash:
hosts: ["<<LISTENER-HOST>>:5015"]
ssl.certificate_authorities: ['/etc/pki/tls/certs/COMODORSADomainValidationSecureServerCA.crt']
Start Metricbeat
Start or restart Metricbeat for the changes to take effect.
Open your Envoy dashboard in Logz.io
Give your metrics a few minutes to get from your system to ours, and then open Logz.io.
Your metrics should appear in the preconfigured dashboard in your Metrics account. To open it, search your Logz.io Metrics dashboards for Envoy.