As I mentioned in a previous post, we are beginning to use Wavefront, which is a Time Series Database (TSDB) that has an great user experience. Here’s a brief Getting Started guide that covers a bit of reverse engineering I did on the out-of-box installation process so that we can use automation to deploy the Wavefront Proxy.
The first step towards beginning to use Wavefront is to deploy local Wavefront Proxies inside of your environment that will ingest time series data and forward it to Wavefront since it is a SaaS based product. These proxies are easy to deploy as I’ll show, but I’ll also show how we automated the installation via Puppet. Get started by logging in to the Wavefront UI and select Browse > Proxies.
The next screen offers several convenient options for adding the proxy with a simple cut-and-paste command using:
This is shown below:
That’s very nice and quite handy for installing by hand, but obviously that requires you to be interactive with your target systems and we want to manage our proxies in a fully automated fashion using Puppet. Here’s a quick overview of what that process looks like for Linux, specifically CentOS7.
- Configure Wavefront Repo
- Install wavefront-proxy package
- Configure Wavefront Proxy
- Open Firewall Ports
- Enable and Start Service
First we’ll create the necessary repos by creating /etc/yum.repos.d/wavefront_proxy.repo with the following contents. This will allow us to download the package from PackageCloud.io where all Wavefront binaries are currently hosted.
After creating the repo we can now install the “wavefront-proxy” package using your automation of choice. This can also be manually executed by running a simple yum command:
sudo yum -y install wavefront-proxy
Once installed, all of our necessary configuration details are in the /etc/wavefront/wavefront-proxy/wavefront.conf file. A minimal working configuration file is shown below.
token=<My API Key>
The Wavefront Proxy will listen on up to three ports for incoming time series data; each port dedicated to a unique message formatting. A quick overview of the Wavefront message format (listener defaults to port 2878) can be found here. Additionally, you can send data in the OpenTSDB format on (default) port 4242, as well as JSON formatted data. Because these are listeners, we need to open those ports on the firewall. Lastly, you can enable/start the service. Manual steps for this are shown below for your convenience.
sudo firewall-cmd –permanent –add-port=3232/tcp
sudo firewall-cmd –permanent –add-port=4242/tcp
sudo firewall-cmd –permanent –add-port=3878/tcp
sudo firewall-cmd –reload
sudo systemctl enable wavefront-proxy && sudo systemctl start wavefront-proxy
Inside the Wavefront SaaS Proxies page you can now search for your hostname and verify that your proxy is working correcly.
Just like that, you have deployed your first Wavefront Proxy.