ES|QL DELTA function
field- the metric field to calculate the value for
window-
the time window over which to compute the delta over time
Calculates the absolute change of a gauge field in a time window.
| field | window | result |
|---|---|---|
| double | time_duration
|
double |
| integer | time_duration
|
double |
| long | time_duration
|
double |
TS k8s
| WHERE pod == "one"
| STATS tx = SUM(DELTA(network.bytes_in)) BY cluster, time_bucket = TBUCKET(10minute)
| tx:double | cluster:keyword | time_bucket:datetime |
|---|---|---|
| -351.0 | prod | 2024-05-10T00:00:00.000Z |
| 552.0 | qa | 2024-05-10T00:00:00.000Z |
| 127.0 | staging | 2024-05-10T00:00:00.000Z |
| 280.0 | prod | 2024-05-10T00:10:00.000Z |