Querying
Functions
- abs()
- absent()
- ceil()
- changes()
- clamp_max()
- clamp_min()
- day_of_month()
- day_of_week()
- days_in_month()
- delta()
- deriv()
- exp()
- floor()
- histogram_quantile()
- holt_winters()
holt_winters(v range-vector, sf scalar, tf scalar)produces a smoothed value for time series based on the range inv. The lower the smoothing factorsf, the more importance is given to old data. The higher the trend factortf, the more trends in the data is considered. Bothsfandtfmust be between 0 and 1.
hour()
idelta()
increase()
irate()
label_join()
label_replace()
ln()
log2()
log10()
minute()
month()
predict_linear()
rate()
resets()
round()
scalar()
sort()
sort_desc()
sqrt()
time()
timestamp()
vector()
year()
<aggregation>_over_time()
PromQL
sum by (instance) (
irate(
container_cpu_usage_seconds_total{
pod_name=~"worker.*"
}[5m]
)
)
To subtract two metrics use on ()
celery_tasks_total{instance="celery-exporter.airflow.svc.cluster.local:8888", job="celery-monitoring", name="airflow.executors.celery_executor.execute_command", namespace="airflow", queue="undefined", state="RECEIVED"} - on ()
(celery_tasks_total{instance="celery-exporter.airflow.svc.cluster.local:8888", job="celery-monitoring", name="airflow.executors.celery_executor.execute_command", namespace="airflow", queue="undefined", state="SUCCESS"} + on () celery_tasks_total{instance="celery-exporter.airflow.svc.cluster.local:8888", job="celery-monitoring", name="airflow.executors.celery_executor.execute_command", namespace="airflow", queue="undefined", state="FAILURE"})