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

"Not found" pop up message on every page after upgrading to v11 version #87891

Open
YevhenLodovyi opened this issue May 15, 2024 · 3 comments
Open

Comments

@YevhenLodovyi
Copy link

What happened?

I am testing the new grafana version(v11) and I can see the pop up message on every page). As far as I can see it is due to disabled alerting.
Screenshot 2024-05-15 at 10 56 37

Screenshot 2024-05-15 at 10 49 23

What did you expect to happen?

no pop up message since it is very annoying

Did this work before?

yes

How do we reproduce it?

  • disable alerting:
[unified_alerting]
enabled = false

Is the bug inside a dashboard panel?

no

Environment (with versions)?

Grafana: 11.0.0
OS:
Browser: Chrome 124.0.6367.203

Grafana platform?

Docker

Datasource(s)?

No response

@alex2grad
Copy link

I had the same issue.
As workaround I deleted all permission associated with alert rules and no "Not found" pop up message anymore.

stop grafana
sqlite3 /var/lib/grafana/grafana.db
sqlite> delete from permission where action in ('alert.rules:read','alert.rules:create','alert.rules:delete','alert.rules:write');
start grafana

@dastrobu
Copy link

I can report the same issue after upgrading to Grafana 11. The request that is failing is

https://***/grafana/api/prometheus/grafana/api/v1/rules?dashboard_uid=container-restarts

The response is {"message":"Not found"}.

Grafana logs on debug level are also not very helpful:

logger=context traceID=999b0f5636618b8fc073488bb36873c5 userId=201 orgId=156 uname=*** t=2024-05-27T07:38:28.078979597Z level=info msg="Request Completed" method=GET path=/api/prometheus/grafana/api/v1/rules status=404 remote_addr=10.131.85.208 time_ms=9 duration=9.066818ms size=24 referer="https://***/grafana/d/container-restarts/container-restarts?orgId=156" handler=notfound status_source=server

It should also be noted that grafana runs with

[unified_alerting]
  enabled = false

So I am wondering what the calls to prometheus/grafana/api/v1/rules? are for.

@dastrobu
Copy link

Some local testing shows the following API behavior:

[unified_alerting]
  enabled = true

gives

curl -X GET --location "http://localhost:3000/grafana/api/prometheus/grafana/api/v1/rules"     -H "Accept: application/json"     -H "Content-Type: application/json"     -H "Authorization: basic ***"     -H "X-Grafana-Org-Id: 1"
{"status":"success","data":{"groups":[]}}

whereas

[unified_alerting]
  enabled = false

gives

curl -X GET --location "http://localhost:3000/grafana/api/prometheus/grafana/api/v1/rules"     -H "Accept: application/json"     -H "Content-Type: application/json"     -H "Authorization: basic ***"     -H "X-Grafana-Org-Id: 1"
{"message":"Not found"}

So it looks like a UI bug, where the UI is not aware of disabled alerting and tries to fetch rules, even if the API is disabled.

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

3 participants