Prometheus

Prometheus

Introduction

What is Prometheus?

Prometheus is an open-source systems monitoring and alerting toolkit originally built at SoundCloud. Since its inception in 2012, many companies and organizations have adopted Prometheus, and the project has a very active developer and user community. It is now a standalone open source project and maintained independently of any company. To emphasize this, and to clarify the project's governance structure, Prometheus joined the Cloud Native Computing Foundation in 2016 as the second hosted project, after Kubernetes.

Prometheus collects and stores its metrics as time series data, i.e. metrics information is stored with the timestamp at which it was recorded, alongside optional key-value pairs called labels.

For more elaborate overviews of Prometheus, see the resources linked from the media section.

Features

Prometheus's main features are:

  • a multi-dimensional data model with time series data identified by metric name and key/value pairs

  • PromQL, a flexible query language to leverage this dimensionality

  • no reliance on distributed storage; single server nodes are autonomous

  • time series collection happens via a pull model over HTTP

  • pushing time series is supported via an intermediary gateway

  • targets are discovered via service discovery or static configuration

  • multiple modes of graphing and dashboarding support

Components

  • the main Prometheus server which scrapes and stores time series data

  • special-purpose exporters for services like HAProxy, StatsD, Graphite, etc.

  • an alertmanager to handle alerts

  • various support tools

Concepts

Data model

Metric names and labels

Metric types

Counter

Gauge

Historam

Summary

Jobs and instances

Deploy By Binary

Quick Start

Config and Boot

Prometheus Config

Boot(systemd)

Deploy By Container

Run On Docker

Run On Kubernetes

Visualization

AlertManager

Quick Start

[[sc-monitoring#Alertmanager|Alert Config]]

Metrics exporter

node_exporter

Download and Install

middleware exporter

redis-exporter

kafka-exporter

rocketmq-exporter

Reference:

Last updated