Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No data points in direct rendered image #9447

Closed
cwilldev opened this issue Oct 6, 2017 · 8 comments
Closed

No data points in direct rendered image #9447

cwilldev opened this issue Oct 6, 2017 · 8 comments

Comments

@cwilldev
Copy link

cwilldev commented Oct 6, 2017

I am using Grafana (v4.5.2) with Docker (version 17.06.2-ce) on an Ubuntu machine (17.04 zesty).

I have configured a dashboard that is working quite well:

astro_dashboard

But when I try to use share->Direct link rendered image I get following png:

astro-dashboard_rendered

I already played around with some configurations like root_url with no success.

I doubt that I have font issues, since everything else is just rendered fine.

There is a red exclamation mark on the very top left corner of the rendered image. But, since it's just an image, I don't know what this is about, because the logs do not display any issues neither..

grafana_1           | 2017-10-06T07:01:03.665506391Z t=2017-10-06T07:01:03+0000 lvl=info msg=Rendering logger=png-renderer path="dashboard-solo/db/astro-dashboard?orgId=1&panelId=1&from=1507191739006&to=1507201054321&notitlebar=1&width=1000&height=500&tz=UTC%2B02%3A00"
grafana_1           | 2017-10-06T07:01:04.008818952Z Loading a web page: http://localhost:3000/dashboard-solo/db/astro-dashboard?orgId=1&panelId=1&from=1507191739006&to=1507201054321&notitlebar=1&width=1000&height=500&tz=UTC%2B02%3A00 status: success 60000
grafana_1           | 2017-10-06T07:01:04.447557317Z t=2017-10-06T07:01:04+0000 lvl=dbug msg="Image rendered" logger=png-renderer path=/var/lib/grafana/png/9Wf00QLnaZapI1U2p2u2.png

So does anyone has a clue why I don't see any datapoints?

Regards,
Christopher

@torkelo
Copy link
Member

torkelo commented Oct 6, 2017

what is your datasource and how does grafana access it? For server side rendered images grafana-server needs to be able to access the url you specified in data source settings.

Since your using docker, maybe the docker container has no network access to the data source?

@torkelo torkelo closed this as completed Oct 6, 2017
@cwilldev
Copy link
Author

cwilldev commented Oct 6, 2017

@torkelo Just awesome, you pointed me to my exact problem!
The datasources was configured to use "localhost". This was fine for using Grafana on the host machine.
But the image generation gets executed on the docker-machine itself, and this machine can not resolve localhost to the other docker-machine (influxdb).
So I've changed the datasource to use the docker-container name rather than "localhost" and now everything works as expected.
Thanks you!

@cwilldev
Copy link
Author

cwilldev commented Oct 6, 2017

But one thing.. why in this case there are no connection errors in the logfiles?

@ondrejFuchs
Copy link

Please give me more information about "So I've changed the data source to use the docker-container name rather than "localhost" and now everything works as expected.".
I use grafana with influxdb. Every service run on own docker-container and connected by one network in docker-compose.

I got logs: t=2018-11-12T10:56:43+0000 lvl=dbug msg="Phantomjs output" logger=rendering out="Loading a web page: https://localhost:3000/d-solo/WYjho9aiz/test-ondra?panelId=4&render=1

And I got in email alert notification only:
wjuww143x8x6n62faju4

I also think, that problem is on connection but don't know where.
Thanks for any help.

@cwilldev
Copy link
Author

@ondrejFuchs Puh, that's already more than a year ago. As I recall correctly my datasource was configured as localhost, which then could not get accessed from outside. So I've changed it to the docker-container name as mentioned. Did you check whether the grafana container has access to the influx container?

@ondrejFuchs
Copy link

Any advice how can i check it? I have also setting influxdb as localhost (run in docker). If I add new datasource in grafana, I settup it like: https://<my_ul>:8086. For example https://test.com:8086 and it work perfect but not in pictures in email notification.

@cwilldev
Copy link
Author

Did you verify if your grafana container can access the URL from within the container?

@iautom8things
Copy link

Just in case someone with a similar issue to me finds this:

I'm running grafana and prometheus in docker, but grafana is connecting to prometheus through nginx w/ https via letsencrypt.

Like OP, dashboards worked fine, but direct rendered image gave me this red exclamation point with no data.

I had to edit my data source and switch it from Server to Browser for HTTP -> Access setting:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants