Grafana only return 404 from my Prometheus data source

Hello,

(due to the limitation on writing url for new user, I had to mess up some url)

I have a server that has prometheus data source running on localhost:9180.
Running curl htt p://localhost:9180/metrics on the server does indeed return the metrics.
Now, I have a Grafana running on the same server, that I expose to the internet via a reverse proxy.
I access Grafana through the internet-exposed url grafana.mywebiste .com.
I configured graphana with the domain grafana.mywebsite .com and the root_url https:// grafana.maeln.com.

I can access the grafana web client with no issue, but when I try to add my Prometheus data source via the Grafana web client, using url = htt p://localhost:9180, clicking “save & test” show me an error box with the message “HTTP Error Not Found”.

When looking through my browser request, I see the request to /api/datasources/proxy/2/api/v1/query?query=1%2B1&time=1575645893.174 returning 404.

The log of Grafana also show that the request return 404.

When trying to create a request through Grafana to this data source, I get the same result.

The Prometheus should be available to Grafana since they are running on the same machine.

Can someone help me understand the issue ?

Hi I am also facing the same problem.

Metrics can be pulled by browser in the new tab and even curl is pulling the data in the host.

I have also disabled CORS security in the browser as well.

What could be the reason? Please advise