Monitoring relies a lots on metrics. It allows you to build dashboards and alerting to setup your SLI. It exists lots of Monitoring platforms and they are often built around the following components:
- Collectors for retrieving the data to monitor
- Time series databases to store the collected metrics
- Dashboards to visualize the metrics
- Alerting system to trigger alerts
Such a monitoring platform is Prometheus which I usually work with. But this time I had to collect metrics from an Activemq broker using an existing TICK stack.
Let’s start by a presentation of the InfluxData TICK stack. In the next article, I will put this in practice by explaining in details how you can monitor an ActiveMQ broker.
InfluxData stack overview
The editor InfluxData has built a full monitoring stack called TICK stack. TICK stands for :
- Telegraf : metric’s collector
- InfluxDB : metric’s time series database
- Chronograf : data visualization
- Kapacitor : alerting system
Telegraf is a
go binary you can install as agent on each server you want to monitor.
Once installed, Telegraf start collecting metrics. Default collected metrics are :
Telegraf defines itself as plugin oriented. Sure it contains lots of different inputs, processors and outputs. And you can contribute your own plugin. But it is not modular : all the plugins are included in the telegraf binary. If you want to add your custom plugin without contributing it, you need to rebuild the binary from source. Same thing if you want to run a lightweight telegraf binary with the only plugins you need, you’ll have to rebuild it removing the unneeded plugins.
So instead of writing new plugins, it is better to take advantage of already existing ones. And fortunately, there is a very flexible plugin when it comes to retrieve metrics from jvm systems : jolokia2 plugin.
InfluxDB is an opensource time series database : it is used to store metrics values over time.
Other popular time series databases :
InfluxDB is the core component of InfluxData platform.
InfluxDB metrics can be queried with InfluxQL, an SQL-like query language.
Chronograf is the visualization tool of the stack. Use it to explore your data, and to create your dashboards. It can also be linked to Kapacitor to define alert rules.
Kapacitor is the influxData alerting engine. Kapacitor can forwards alerts on multiple systems : smtp, pager duty, slack, …
We have introduced TICK stack components to understand how they can be used to implement a full monitoring stack. Now it is time to see how to use it with a concrete example. This will be the subject of the next article.