prometheus/docs
Dmitry Ponomaryov b18272a572
Add template functions to support various use cases. (#16619)
Presumably, this will help with Loki alerts, but the added functionality is also generally useful.

For one, this enables `parseDuration` to also accept negative duration (as that's something that is also used in PromQL by now).

This also adds a function `now` to return the evaluation time of the template (as seconds since epoch AKA Unix time) and a function `toDuration` (akin to `toTime`), which creates a Go `time.Duration` from a duration in seconds.

---------

Signed-off-by: Dmitry Ponomaryov <me@halje.ru>
Signed-off-by: Dmitry Ponomaryov <iamhalje@gmail.com>
2025-07-10 00:33:20 +02:00
..
command-line docs: Added documentation for promtool configuration with http.config.file (#16522) 2025-07-07 00:00:51 +02:00
configuration Add template functions to support various use cases. (#16619) 2025-07-10 00:33:20 +02:00
images Add 2.0 storage docs (#3423) 2017-11-07 22:00:38 +01:00
querying Merge pull request #16716 from charleskorn/charleskorn/binops-docs 2025-07-02 10:02:17 +02:00
feature_flags.md PromQL: min/max/step: Address review comments 2025-07-02 11:17:36 +02:00
federation.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00
getting_started.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00
http_sd.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00
index.md Update prometheus.io's URL to the latest version (#5270) 2019-02-27 10:39:50 +00:00
installation.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00
management_api.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00
migration.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00
stability.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00
storage.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00