Alert request to Prometheus for Project System not working

I have enabled monitoring in Rancher 2.2.6 both on the System project and Default project.

Here I am trying to create simple alert in grafana under system project :

The query is:
sum(go_goroutines)

And it return error : tsdb.HandleRequest() error bad_response: bad response code 401
I have enable basic auth on grafana but it seems the data source not configured for basic auth.

But it works fine when I try create alert in default project.
Do I need to setup additional config?

2 Likes

Hi @JinFreaks Did u solve this problem. I have also facing problem same as you.

Hi, looks like there is default datasource endpoint with prometheus-auth in front.
I have created new datasource with http://access-prometheus endpoint and it works.

any pointers how you do that?
I facing same issues creating normal alerts
“error”:"tsdb.HandleRequest() error client_error: client error: 401

Try to use: Grafana -> Configuration -> Data sources -> URL http://access-prometheus

1 Like

thanks I can do that, But another question do you have yaml file that has datasource with http://access-prometheus