Skip to content
On this page

PromQL Compliance List

Introduction

PromQL is the query language for Prometheus. It is a powerful and flexible language to retrieve data for alerting, graphing, and analysis.

GreptimeDB has reimplemented PromQL (lexer, parser and engine) entirely in Rust, here attaches the compatibility list. You can also check our latest compliance report in this tracking issue.

Compatibility List

Overview

Literal

Both string and float literals are supported, with the same rule as PromQL.

Selector

Both instant and range selector are supported. The only exception is the label matching on metric name, e.g.: {__name__!="request_count}" (but the equal-matching case is supported: {__name__="request_count}").

Time duration and offset are supported, but @ modifier is not supported yet.

Binary

Pure literal binary-expr like 1+1 is not supported yet.

  • Supported:

    OperatorExample
    adda + b
    suba - b
    mula * b
    diva / b
    moda % b
    eqlca == b
    neqa != b
    gtra > b
    lssa < b
    gtea >= b
    ltea <= b
  • Unsupported:

    OperatorProgress
    powerTBD
    atan2TBD
    andTBD
    orTBD
    unlessTBD

Aggregators

  • Supported:

    AggregatorExample
    sumsum by (foo)(metric)
    avgavg by (foo)(metric)
    minmin by (foo)(metric)
    maxmax by (foo)(metric)
    stddevstddev by (foo)(metric)
    stdvarstdvar by (foo)(metric)
  • Unsupported:

    AggregatorProgress
    countTBD
    groupingTBD
    topkTBD
    bottomkTBD
    count_valuesTBD
    quantileTBD

Instant Functions

  • Supported:

    FunctionExample
    absabs(metric)
    ceilceil(metric)
    expexp(metric)
    lnln(metric)
    log2log2(metric)
    log10log10(metric)
    sqrtsqrt(metric)
    acosacos(metric)
    asinasin(metric)
    atanatan(metric)
    sinsin(metric)
    coscos(metric)
    tantan(metric)
  • Unsupported:

    FunctionProgress
    absentTBD
    scalarTBD
    sgnTBD
    sortTBD
    sort_descTBD
    timestampTBD
    acoshTBD
    asinhTBD
    atanhTBD
    sinhTBD
    coshTBD
    tanhTBD
    degTBD
    radTBD
    other multiple input fnsTBD

Range Functions

  • Supported:

    FunctionExample
    ideltaidelta(metric[5m])
    <aggr>_over_timecount_over_time(metric[5m])
  • Unsupported:

    FunctionExample
    stddev_over_timeTBD
    stdvar_over_timeTBD
    changesTBD
    deltaTBD
    rateTBD
    derivTBD
    increaseTBD
    ideltaTBD
    irateTBD
    resetTBD