Commit Graph

1 Commits

Author SHA1 Message Date
Giedrius Statkevičius 3962da4073
cli: add new template render command (#2538)
* cli: add new template render command

Add a new template rendering command that allows users to test out their
templates. This is especially needed because small bugs in templates do
not surface until alertmanager actually tries to render them.

* cli: permit passing alert data via a file

Add a new parameter `--templatefile` for `amtool` so that it would be
possible to pass custom alert data. Use an example `template.Data` if
none has been passed to permit simple use-cases.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
2021-08-04 13:58:33 +02:00