dominikp/Dynatrace-AppMon-UEM-PureLytics-Heatmap

"Request failed:"

tutnes opened this issue · 6 comments

I have downloaded Greasemonkey and the script. I am tying to generate a heatmap, but I am getting "Request failed:"

PS: I am not using any sort of authentication on the ElasticSearch.
Anywhere you suggest I look?

Can you use the Firefox developer tools to find out more about the failed request?

A very common pitfall is that the web server / elastic search cluster does not allow CORS requests. There will be a preflight request (OPTION) and then the actual POST request that downloads the data.

It is connected to the CORS (which I thougt I had enabled, but hadnt)
But It would be nice with an output that said it (so I didnt have to use dev tools :)

These are the settings I have put in the elasticsearch.yaml

I am still gettting a complaint for the CORS

http.cors.enabled: true
http.cors.allow-origin: true
http.cors.allow-methods: true
http.cors.allow-headers: true
http.cors.allow-credentials: true

(Årsak: CORS-header 'Access-Control-Allow-Origin' mangler).
Reason CORS header .... missing

So I am getting a bit further now, but now I got this message:
image

Ok, so I got it to work now (atleast downloading the data)

http.cors.enabled: true
http.cors.allow-origin: "<the url here>"
#http.cors.allow-methods: true
http.cors.allow-headers: "authorization"
http.cors.allow-credentials: true

great - thanks for sharing the details!