prometheus/docs/configuration
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
..
alerting_rules.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00
configuration.md chore: fix some minor issues in comments 2025-07-09 18:05:41 +08:00
https.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00
index.md Consolidate configuration and rules docs in docs/configuration/ 2017-10-27 09:54:02 +02:00
promtool.md chore: fix some minor issues in comments 2025-07-09 18:05:41 +08:00
recording_rules.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00
template_examples.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00
template_reference.md Add template functions to support various use cases. (#16619) 2025-07-10 00:33:20 +02:00
unit_testing_rules.md Add documentation for custom_values usage in NHCB (#16757) 2025-06-24 21:52:55 +02:00