Replies: 7 comments 8 replies
-
Thanks for raising these concerns! We understand that this experience is not as smooth as we would like it ourselves. This is mostly a result of the operator resources trying to adhere to different constraints and solve additional uses on top of "just" provisioning them (like linking between resources by k8s identifiers). Your input into what you tried & expected is immensely valuable! We'll try to get our documentation updated to better illustrate the configuration model of the operator. For the specific issues of alerts, have you found this page in our documentation: https://grafana.github.io/grafana-operator/docs/alerting/ It contains a full alerting setup including folder, rules, groups and notifications |
Beta Was this translation helpful? Give feedback.
-
Thank you @theSuess Yeah, this is the documentation I was following. Let me outline where I observed apparent deficiencies:
Ok, so it seems like the scheme exported from the legacy side has potential fundamental differences than that of the operated side
So I am gonna have to script a way around this I think. More to come. |
Beta Was this translation helpful? Give feedback.
-
OK, I had some time to try and script around this and I was hoping I could just take a straight copy of the ❯ k -n grafana apply -f vmc-1m_folder.yaml -f vmc-1m_masterdb-cpu-alert_alert.yaml
OK: This is DEV...
grafanafolder.grafana.integreatly.org/vmc-1m created
Error from server (BadRequest): error when creating "vmc-1m_masterdb-cpu-alert_alert.yaml": GrafanaAlertRuleGroup in version "v1beta1" cannot be handled as a GrafanaAlertRuleGroup: strict decoding error: unknown field "spec.rules[0].dashboardUid", unknown field "spec.rules[0].notification_settings", unknown field "spec.rules[0].panelId" The scheme in the source rule doesn't match that of what the operator desires it seems. Now, looking at these objects, it makes sense to me why these probably shouldn't carry over as they are likely dynamic fields. We also have not yet attempted to migrate notification policies and contact policies over yet. However, the |
Beta Was this translation helpful? Give feedback.
-
@theSuess there is a mildly troubling problem we've just uncovered and I'm hoping you can shed some light on how to overcome this. I've successfully imported alerts and the folders those alerts belong (which are evaluation groups I believe). The problem is that the folders I generated for the alerts, since they are using the notice anything with an evaluation period (1m, 5m, etc) is not technically a dashboard folder, but the following folders are what are showing up as dashboard folders erroneously: I suspected this might happen. Is this a bug? |
Beta Was this translation helpful? Give feedback.
-
Hi @notjames It is up to the user to design their folder structure for their use case. The Grafana Operator, to my knowledge, can represent any valid folder structure which you can create in Grafana. If you want to split Evaluation groups(GrafanaAlertRuleGroup) and Dashboards(GrafanaDashboard) into separate folders(GrafanaFolder), you need to create at least two folder resources. Otherwise, you can have both your Evaluation groups(GrafanaAlertRuleGroup) and dashboards(GrafanaDashboard) reference the same folder and they will appear in different tabs when navigating to the folder. I hope this clears up some misconceptions 😄 |
Beta Was this translation helpful? Give feedback.
-
after setting up alerts/for my org, my advice with Grafana folders and the alerts is Then for each rule under the evaluation group:
|
Beta Was this translation helpful? Give feedback.
-
This was a good conversation which I believe have answeredd most of my questions. I'm going to jump into contact and notification policies now. Is #1529 still relevant? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
Apologies. This is mildly lengthy, but these are all related to one another:
It seems like the CRs for grafana operator for things like alert rules groups, notification policies, and contact policies are still young? So far I've only tried migrating alert rule groups and that's proving to be pretty complicated. I was hoping that migrating the exported bits from the non operated grafana into a CR would "just work." but that doesn't work at all. In fact, it appears that the concept of rule groups doesn't exist in the CR despite the name of the CR being called
GrafanaAlertRuleGroup
We're using Grafana exclusively for everything to manage TSD visualization and alerting. I was hoping I could just
Export Rules
from the alert rules page (which exports all rules groups system wide for readers' context) and place them in the yaml property of the GrafanaAlertRuleGroup. That, of course, doesn't work. The yaml property spec gets violated by several properties of each rule in that yaml output.OK cool, so I guess I need to go through each rule and export each rule into a single GrafanaAlertRuleGroup. But that leaves questions about how to import each group into their respective evaluation groups. I suppose those would be folders? The documentation doesn't address that. Moreover, the folders, while mentioned, are ambiguous with respect to how those coexist with alert folders (or not).
Contact points will be a problem, too, it seems: #1529
I haven't looked into notification policies yet.
However, migrating alerts went great!
Version
5.17.0-debian-12-r0
To Reproduce
Steps to reproduce the behavior:
asked and answered
Expected behavior
Confirmation of my observations
Maybe documentation that exists (hopefully) that disambiguates steps to take to migrate from non operated grafana to operated grafana for notification policies, contact policies, and alert rules/groups
Suspect component/Location where the bug might be occurring
unknown
(NA)Screenshots
If applicable, add screenshots to help explain your problem.
Runtime (please complete the following information):
Additional context
NA
Beta Was this translation helpful? Give feedback.
All reactions