Skip to content
This repository has been archived by the owner on Feb 26, 2018. It is now read-only.

Latest commit

 

History

History
93 lines (65 loc) · 2.86 KB

prometheus.md

File metadata and controls

93 lines (65 loc) · 2.86 KB

Prometheus

Translating between monitoring languages

A comparison from Prometheus guys https://www.robustperception.io/translating-between-monitoring-languages/

Start and end

  • Graphite: from, until
  • PromQL: start, end
  • InfluxQL: where clause on time

Graphite have color and stacked

Syntax

  • Graphite: nested prefix function
  • PromQL: C expression like
  • InfluxQL: SQL-like

Math

Adding 1 to all values across a set of time series

  • Graphite: offset(seriesname.*, 1)
  • InfluxQL: SELECT 1 + "value" FROM "seriesname"
    • NOTE: InfluxQL need to specify value because it support multiple fields
  • PromQL: seriesname + 1

Arithmetic operations

  • Graphite: invert, scale, pow
  • PromQL: +, -, *, /, %
  • InfluxQL: +, -, *, /

Functions

Select

  • Graphite: seriesname.filter
  • InfluxQL: SELECT "value" FROM "seriesnamne" WHERE tag="filter"
  • PromQL: seriesnamne{labelname="filter"}

Working Across Series

  • Graphite: averageSeries(seriesname.*)
  • InfluxQL: SELECT MEAN("value") FROM "seriesname"
  • PromQL: avg(seriesname)
  • TODO: it seems to be the group by, like I have tags like application, region, instances, now I want to group by region, and use average for all the instances in the same region

Skipped

Working Across Time

  • moving average

Prediction

Binary Operators

math between two different series