-
Notifications
You must be signed in to change notification settings - Fork 37
Configuring Vault and Consul
Asking Consul to send telemetry to Telegraf is as simple as adding a telemetry
section to your agent configuration:
{
"telemetry": {
"dogstatsd_addr": "localhost:8125",
"disable_hostname": true
}
}
As you can see, we only need to specify two options. The dogstatsd_addr
specifies the hostname and port of the
statsd daemon.
Note that we specify DogStatsd format instead of plain statsd, which tells Consul to send tags
with each metric. Tags can be used by Grafana to filter data on your dashboards (for example, displaying only
the data for which role=consul-server
. Telegraf is compatible with the DogStatsd format and allows us to add
our own tags too, as you'll see later.
The second option tells Consul not to insert the hostname in the names of the metrics it sends to statsd, since the
hostnames will be sent as tags. Without this option, the single metric consul.raft.apply
would become multiple
metrics:
consul.server1.raft.apply
consul.server2.raft.apply
consul.server3.raft.apply
If you are using a different agent (e.g. Circonus, Statsite, or plain statsd), you can find the configuration reference here.
Similar to Consul, configuring Vault to send us telemetry is painless. Just add one stanza to your Vault config:
telemetry {
dogstatsd_addr = "localhost:8125"
disable_hostname = true
}
The options are the same as they were for Consul. The full reference can be found here.
Next up: Configuring a connection between Grafana and InfluxDB.
This page is part of the Vault and Consul monitoring guide.