Introduction

In our previous discussions Kubernetes Monitoring with Prometheus & PrometheusOperator & KubePrometheus , we focused on the implementation of Prometheus, Prometheus-Operator, and kube-prometheus.

However, as we scaled and our needs evolved, we encountered certain limitations inherent to Prometheus, especially for the long term metrics store.

That’s when I check Thanos.io an Open source, highly available Prometheus setup with long term storage capabilities.

What is Thanos

Thanos emerges as a solution to these challenges, extending Prometheus in several critical areas:

Thanos Components & Architecture

Thanos has a lot components, which might initially seem daunting. However it’s smart designed to split components with distinct and decoupled purposes. Once we understand the principle we can easily understand each components.

Write Path

Let’s look at the write path first, different components share same goal, write metrics chunks from different sources to the chosen storage.

Untitled

The Storage*

Thanos uses object storage as primary storage for metrics and metadata related to them. It support major object storages by cloud providers.

Thanos Sidecar

Thanos Sidecar runs on the existing prometheus pod as a sidecar, it directly access the data chunks created by Prometheus and upload to storage