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

Alert tab not visible for panels for certain visualization types #87909

Closed
nagylzs opened this issue May 15, 2024 · 5 comments · Fixed by #88756
Closed

Alert tab not visible for panels for certain visualization types #87909

nagylzs opened this issue May 15, 2024 · 5 comments · Fixed by #88756
Labels
area/alerting Grafana Alerting

Comments

@nagylzs
Copy link

nagylzs commented May 15, 2024

What happened?

  • Create a new panel with "time series" type
  • Add a query, save the panel
  • Add an alert to the panel (using the "Alert" tab on the panel editor) and save it
  • Check appearance: the panel shows on the dashboard, and also the heart icon is showing the state of the associated alert
  • Then go back and edit the panel
  • Change its visualization type to something else - in my case I changed it to "heatmap"
  • Notice that the "Alerts" tab disappears from the panel editor <<<< this is the actual bug
  • Save the panel and look at the dashboard. The alert heart icon is still there ,and the alert is still associated with the panel. It works, but it is not accessible through the panel editor.

image

image

If you change back the visualization type to time series, then the alert re-appears.

What did you expect to happen?

Always show the "Alert" tab, independently of the panel type. The alert can have a separate underlying database query; there is no reason to hide it.

Did this work before?

I have no idea if it was working before.

How do we reproduce it?

Please see the "what happened" section for this.

Is the bug inside a dashboard panel?

I'm not able to paste the panel's JSON here because the db query is confidental, but this problem is a general, so it seems.

Environment (with versions)?

Grafana: Grafana v11.0.0 (277ef258d4)
OS: Server is Ubuntu 22.04.3 LTS
Browser: Chrome on linux (not relevant, it happens on all browsers)

Grafana platform?

A package manager (APT, YUM, BREW, etc.)

Datasource(s)?

No response

@tonypowa
Copy link
Contributor

tonypowa commented Jun 3, 2024

Hi @nagylzs

Thank you for creating this issue

We were actually about update the docs to list the panels that support alerts (time-series, and alert list panel)

Alerting will only work if the data format is in wide series. However, since data sources can emit different sorts of data frame formats (even switching dynamically based on toggles / drop downs in the data source editor), we can't determine whether to show the alerts tab in panels other than the one listed above. Similarly, Grafana won't update the UI retro-actively.

Hope that makes sense.
I'm closing this issue, but feel free to add any feedback or comments!

@tonypowa tonypowa closed this as completed Jun 3, 2024
@tonypowa tonypowa added the area/alerting Grafana Alerting label Jun 3, 2024
@nagylzs
Copy link
Author

nagylzs commented Jun 3, 2024

I'm sorry, I don't understand the explanation. The alert has its own query. The data format is determined by the query of the alert, not the query of the panel. How can the data panel's query limit the associated alert?

@tonypowa
Copy link
Contributor

tonypowa commented Jun 3, 2024

You're right, the alert rule doesn't need to match the visualization since they're separate. We only show the alerts tab for time series because that's what the old system supported. It's something we might revisit later. There are valid use cases for supporting alert rules in panels.

@nagylzs
Copy link
Author

nagylzs commented Jun 3, 2024

Should we open this issue then? Or do you think that it works as it should? (I don't see any reason for not showing the alert tab.)

@tonypowa
Copy link
Contributor

tonypowa commented Jun 4, 2024

I've reopened the issue and added it to the Alerting project for future planning or backlog consideration. Currently, only the time-series and alert list panels support alerts. While we recognize the value in extending this feature to other panels, our team unfortunately does not have the resources to implement this at the moment. We appreciate your understanding and patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/alerting Grafana Alerting
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants