Skip to main content

Querying

Functions

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.

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"})