Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve cortextool documentation to cover Alertmanager templates #194

Open
ethirolle opened this issue Jun 21, 2021 · 0 comments
Open

Improve cortextool documentation to cover Alertmanager templates #194

ethirolle opened this issue Jun 21, 2021 · 0 comments

Comments

@ethirolle
Copy link

The cortextool doc (at https://github.com/grafana/cortex-tools/blob/main/README.md) does not dicuss how to interact with alert template files (i.e., these templates: https://prometheus.io/docs/alerting/latest/notification_examples/#defining-reusable-templates).

Here is the advice that I provided to a customer, and which allowed them to resolve their issue:

The solution for the customer was these two changes:

  • cd into the folder that contains both the YAML and template file(s), so that cortextool can refer to bare filenames (no paths to the files), like cortextool alertmanager load alertmanager.yml pagerduty.tmpl

In the Altertmanager YAML file, reference to the template file(s) like this:

templates:
  - pagerduty.tmpl

After doing this, the files upload without error, and cortextool alertmanager get shows the YAML and the template file(s).

Note: with this syntax, I believe you can define and send multiple template files, like:

cortextool alertmanager load alertmanager.yml one.tmpl two.tmpl three.tmpl

Can we add some of this advice in the cortextool ReadMe? Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant