Telegraf

Using the StatsD protocol, a plugin called Telegraf enables monitoring and metrics collection in Consul. StatsD (https://github.com/statsd/statsdis a daemon that summarizes and aggregates key application metrics.

Telegraf collects metrics about the specific host where the Consul agent is deployed and running. The key attributes to collect are: CPU, memory, disk I/O, networking, and process status.

To enable Telegraf's metrics collection, within the Consul agent configuration file the following code needs to be added and enabled:

{
"telemetry": {
"dogstatsd_addr": "localhost:8125",
"disable_hostname": true
}
}

Note that, when Consul is deployed using a Helm chart in a Kubernetes environment, the same feature can be enabled in values.yaml for the Consul connect section, as shown in the following code:

connectInject:
enabled: true
default: true
centralConfig:
enabled: true
defaultProtocol: "http"
proxyDefaults: |
{
"envoy_dogstatsd_url": "udp://127.0.0.1:9125"
}

dogstatsd_addr or envoy_dogstatsd_url is the host IP address and port name for the statsd daemon. This property sends tags for each metric that can be leveraged by Grafana to visualize, filter, and derive data insights on its dashboard.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.204.208