0
votes

I'm trying to use Elastic Cloud(Elasticsearch) as data source in Grafana. In the below, I'm trying to type a url for that Elastic server(service) in the cloud.

enter image description here

My Elastic Cloud has these three applications running.

enter image description here

I tried copying endpoint URL in Grafana. And It doesn't seem to work. so I'm trying to figure out the reason. If my way of putting url is correct, I can move on to suspect other reasons. When I I copy the endpoint and test it on the browser, I get the following result. (seems to work fine on the browser)

enter image description here

Could anyone give me tips on what to put in the URL section of Grafana? Or how to access services in Cloud by url?

additional information: My grafana is not on Cloud. Grafana server is on a regular server. I'm accessing Grafana using below url.

enter image description here

2

2 Answers

1
votes

While running data source as browser mode all request from browser directly goes to data source

But while choosing server mode request goes from browser to grafana backend (Server node where grafana is installed ) and from there it redirect to data source.

If you are using server mode then make sure if you are able to access AWS ES url from machine where Grafana is hosted.

0
votes

I had to do so many tests to figure this out.

The reason why I got so confused and stuck was because of this message. 'No date field named timestamp found'

enter image description here

I thought it was because I didn't put the right url at first. I changed access mode to browser, too. I opened my dev cosole, and found 'blocked by CORS policy' error. I thought that was the problem, so I spent another hour trying to figure this out. ( setting up Chrome extension for Cors, tried using proxy site, etc) However, you don't need to solve CORS policy problem because you don't need 'browser' mode in this case.

'No date filed _______ found' message is a bug. Just ignore it. It works fine.

I'll post how I did it here just in case.

enter image description here

I have a field called 'timestamp', so just used it. No need to do @timestamp.

If your grafana server is local. ( I mean if you are accessing like `localhost:3000' ) you don't need Basic Auth! I tested it myself. ( I tested with local elasticsearch server and local grafana server) (I tested with local grafana server with cloud elasticsearch server) ( I finally tested with cloud elasticsearch server and grafana server remote) In all cases, I got the 'No data field named ____ found' messeges. It's a bug~!!!! So don't worry.

enter image description here

enter image description here

Back to my original question, 'How to specify a url for applications on Cloud'

Copy the endpoint URL of your application (elasticsearch, in this case) on your Cloud, and just paste it!!

enter image description here

I will not accept my answer, but leave this here so this can help other people.