Prometheus Integration with Cortex

What is Cortex?

  • Horizontal Scaling- Cortex works in a microservice model that means it can be deployed across multiple clusters and multiple Prometheus servers can send data to a single Cortex endpoint. This model embraces the global aggregation of the metrics.
  • Highly Available- Each Cortex component can be scaled individually which provides high availability across the services.
  • Multi-Tenant- If multiple Prometheus servers are sending data to Cortex, in that case, it provides a layer of abstraction between data.
  • Long Term Storage- This is one of the key features of Cortex which comes natively inside it. Cortex supports multiple storage backends to store data for long-term analytics purposes. Some of the storage backend examples are:- S3, GCS, Minio, Cassandra, and Big Table, etc.

Installation

 $ helm repo add hashicorp https://helm.releases.hashicorp.com
$ helm search repo hashicorp/consul
$ helm install consul hashicorp/consul --set global.name=consul --namespace cortex
  • We were already using AWS for few services.
  • Our Kubernetes was running inside the Local Datacenter and Prometheus was also configured at the same location, so we already have a built-in bridge using AWS Direct connect. So network bandwidth was not a concern anymore.
$ helm repo add cortex-helm https://cortexproject.github.io/cortex-helm-chart$ helm install cortex --namespace cortex -f my-cortex-values.yaml cortex-helm/cortex

Prometheus Configuration

remote_write:
url: http://cortex.cortex/api/prom/push

Conclusion

--

--

--

A DevOps Engineer currently working with the OpsTree Solutions

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Asynchronous programming in Flutter/Dart

Clean, Readable Code

How to handle AWS Lambda errors like a pro

Modern OAuth for Single Page Applications Using PKCE

How to Add Route/Mapping in APIKit Router Manually

Static libraries in C language

Insertion-Sort — Everything you need to know!

Building natural Voice Ordering experience on Chatbot using Google DialogFlow

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhishek Dubey

Abhishek Dubey

A DevOps Engineer currently working with the OpsTree Solutions

More from Medium

How to use KubeCTL and Lens IDE through Portainer

Kubernetes Security Best Practices: Definitive Guide

Managing Kubernetes Job with Helm

Registering clusters in Rancher with Terraform