Introduction
Prerequisites
- Vault
- Telegraf
Overview
Telegraf is often used to direct Vault metrics sent to statsd to platforms such as Splunk to be visualised. It can be use-full to see what Vault is sending before the data reaches it's final destination i.e to confirm something has in-fact been sent.
Procedures
- Add the following to the bottom of your Telegraf cofig file often found at `/etc/telegraf/telegraf.conf` ensuring the output destination is updated
[[outputs.file]]
files = ["stdout", "<LOCATION FOR OUTPUT TO BE WRITTEN>"]
data_format = "json"
json_timestamp_units = "1s"
- Restart telegraf systemctl restart telegraf
- Review the data in the output or specifically search a for a metric i.e. grep vault.core.unsealed <LOCATION FOR OUTPUT TO BE WRITTEN>
- Clean up by removing the stanza from the Telegraf config, restarting Telegraf again and remove the output file.
Note: If not cleaned up, the output file could potentially fill the disk of where it is being written over time.