[SOLVED] Cannot generate direct image of dashboard via call to curl

My bad!!!
Forgot to remove the little ’ in front of anonymus access enabled = true

I am running Grafana 5.3.4 under Ubuntu 18 and I am not able to generate a direct image using an URL.

The URL is: e.g.
http://192.168.1.205:3000/render/d-solo/aZDmdPfmz/frykbacken-temperaturer-och-lufttryck?orgId=1&panelId=2&from=1542448759162&to=1543053559163&width=1000&height=500&tz=Europe%2FStockholm&timeout=10

When this URL is put into Crome, the image is displayed correctly like this:

When calling the same URL using curl like this:
openhab@ib9-oh2-2:/etc/openhab2$ curl -L “http://192.168.1.205:3000/render/d-solo/aZDmdPfmz/frykbacken-temperaturer-och-lufttryck?orgId=1&panelId=2&from=1542448759162&to=1543053559163&width=1000&height=500&tz=Europe%2FStockholm&timeout=10” -o /etc/openhab2/test/test.png
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 29 100 29 0 0 9666 0 --:–:-- --:–:-- --:–:-- 9666
100 22176 0 22176 0 0 3093k 0 --:–:-- --:–:-- --:–:-- 3093k

this generates a seemingly incomplete file of some 22 kbyte with no content. The grafana log says:

t=2018-11-24T12:17:21+0100 lvl=info msg=“Request Completed” logger=context userId=0 orgId=0 uname= method=GET path=/render/d-solo/aZDmdPfmz/frykbacken-temperaturer-och-lufttryck status=302 remote_addr=192.168.1.205 time_ms=0 size=29 referer=

In grafana.ini Anonymus access i set:
#################################### Anonymous Auth ##########################
[auth.anonymous]
# enable anonymous access
;enabled = true
# specify organization name that should be used for unauthenticated users
;org_name = Main Org.
# specify role for unauthenticated users
;org_role = Viewer

I’m running out of ideas.

UPDATE:
The file generated is an .html file which when opened gives the following message:
If you’re seeing this Grafana has failed to load its application files
I am not running Grafana behind a reverse-proxy and I have tried re-installing Grafana (already running latest version) Also restarting grafana-service does not help.

1 Like