0

Edit: I also posted this question, which describes the problem in a much more concise manner. I feel I might be missing something basic, but I just don't know. Any help would be appreciated. Thanks.


Searching StackOverflow, I cam across this post, and I have a very similar problem:

I do have the older format of "notifiers" (in the same exact format of Atom 7k, in above post). However, it looks like in the new way (Unified Alerting), the content and format of contactPoints is different from "notifiers" (For example, in "contactPoints", there is a receivers key, where there is no such key in "notifiers"). Same goes with alert-rules, meaning the format of alert-rules in new way (i.e. Unified Alerting), is different from Legacy format.

So, my question is how do I convert the old format to new? (or get the new format perhaps from API or something)?

I'm using HTTP API to get the contactPoints (api/v1/provisioning/contact-points), and rules (api/ruler/grafana/api/v1/rules/), but they are still in the old format. How can I get/export my alert-rules and contactPoints in new format? It's not practical to convert them from old to new by hand manually. The reason I need the new format, is so I can use provision my alerting resources using file-provisioning. Apparently (I tested), provisioning fails if I use old format, but succeeds with new format, naturally.

I saw this post too, but as I mentioned the API gives me the "old" definitions. I feel I'm missing something, but don't know what exactly.

I'm using Grafana V9.x, and I'm using following setting for migration (migrating from V7.x):

[alerting]
enabled = false
[unified alerting]
enabled = true

I do see alert-rules and contactPoints being populated in Grafana UI as expected. Next, following this post. in step 2, what I get back from API is the "old" content/format, which apparently I can't use for provisioning. How can I get back my alert-rules, contactPoints, etc... in new format, so I can use it for provisioning?

0 Answers0