TICK Stack Internals

Daisy Dharshini
3 min readJul 15, 2020

I would like to share my learnings about Monitoring tools. Hope you like it.

I chose two popular tools to monitor Dynamically changing environments.

One is Prometheus and the other is TICK stack.

TICK stack → Telegraf + Kapacitor + Chronograf and InfluxDB

I will brief each and every component in the stack.

Telegraf is the agent/data shipper that will collect data from the Application servers.

It consists of Plugins.

1. Input Plugins:

Accept/Read data in any formats like JSON, .xml, .log.

2. Processor Plugins:

Determine how metrics are handled and processed. It supports the renaming, adding and dropping of fields. For example, the REGEX plugin allows us to manipulate fields and change tags using REGEX expressions. The Parser plugin, in another example, allows us to parse defined fields and to create new metrics based on the contents of the field.

3. Aggregator Plugins:

Generates new aggregate metrics based on the metrics collected. For example, the ValueCounter aggregator plugin counts the occurrence of values in fields and emits the counter according to a defined schedule.

4. Output Plugins:

Used to ship data to the destination. We can ship the data from the telegraf(output data) directly to the DB like InfluxDB, Elasticsearch or to data processing tools like Kapacitor.

Telegraf will ship metrics from the Application machine to the pre-processor or directly to the DB.

This is something similar to Filebeat which ships Application logs to Elasticsearch/Logstash in the ELK stack.

Instead of shipping logs we are going to ship the Application metrics to the Time-series database.

Kapacitor is a “pre-processor” to “decorate” or enrich the data with a computed value that represents a time period that desire to query.

It uses the mechanism to process the data using the scripts called TICK scripts. We can modify the script based on our requirements.

This is how it process the data from the Application servers.

InfluxDB is a time-series database.
It allows the user to store both regular and irregular data.

In the above diagram,
Stock Price is the measurement.
A,AA,AAPL are tags and tagSets.
Price is the fieldName.
Yellow, Green and Blue lines are called as Series which is Measurement+TagKey+FieldKey.

InfluxDB stores the data in the above structure.

When data comes from Kapacitor or from Telegraf, InfluxDB stores those data in the following fashion.

Using Retention Policy we can decide how long a specified database keeps time series data.

Once the duration of a database is determined, the time series data in the duration inside that database will be further sharded by time so that the time series data can be stored as shards.(Shard is nothing but the data seperation to maintain data in the cluster)

InfluxDB uses WAL(Write Ahead Log) feature

The WALs of index data will determine what the current operation is.

It also uses TSM and TSI modes to store the data. This storage mode allows using different compression algorithms to store timestamps and field names in actual storage scenarios to reduce the size of time series blocks.

Chronograf is a user interface for the entire TICK-stack. This means we can manage different parameters of the TICK-stack using Chronograf.

We can integrate any type of communication/Alerting systems from here.

I tried to integrate with Telegram, PagerDuty, OpsGenie, Slack. It really works Awesome.

That's it !! I will share My Prometheus learnings in the Next post.

--

--