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.
[wavefront_proxy] name=wavefront_proxy baseurl=https://packagecloud.io/wavefront/proxy/el/7/$basearch repo_gpgcheck=1 gpgcheck=0 enabled=1 gpgkey=https://packagecloud.io/wavefront/proxy/gpgkey sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt metadata_expire=300 [wavefront_proxy-source] name=wavefront_proxy-source baseurl=https://packagecloud.io/wavefront/proxy/el/7/SRPMS repo_gpgcheck=1 gpgcheck=0 enabled=1 gpgkey=https://packagecloud.io/wavefront/proxy/gpgkey sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt metadata_expire=300
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.
server=https://<my-instance-url>.wavefront.com/api/ token=<My API Key> ephemeral=false pushListenerPorts=2878 opentsdbPorts=4242 jsonListenerPorts=3878 pushFlushMaxPoints=40000 pushFlushInterval=1000 pushBlockedSamples=5 pushLogLevel=SUMMARY pushValidationLevel=NUMERIC_ONLY customSourceTags=fqdn idFile=/etc/wavefront/wavefront-proxy/.wavefront_id buffer=/var/spool/wavefront-proxy/buffer histogramStateDirectory=/var/spool/wavefront-proxy
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.