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

Plotly direct link rendered image #103

Open
emanuelepica opened this issue May 17, 2020 · 4 comments
Open

Plotly direct link rendered image #103

emanuelepica opened this issue May 17, 2020 · 4 comments

Comments

@emanuelepica
Copy link

Hi, I've installed plotly on grafana, I've used the grafana docker-compose version for installing grafana (with the plotly plugin) and the grafana image render plugin. It seems that the Direct link rendered image don't work for the plotly panel (render failed). I also tried to install grafana, ploty and grafana render plugin without docker and nothing has changed. I've checked that the image rendering works well on other plugins (like worldmap panel) I already tried to follow the issue #88 and changed the file module.ts in the plugin directory adding the row for the "call renderingCompleted" and then restart the grafana server but also in this way nothing happened (maybe I followed wrong this procedure?). I'm unable to render an image of plotly panels, there is a solution? thank you

@Alexadra
Copy link

Alexadra commented Jun 16, 2020

@emanuelepica Save panel image works by command:
curl "http://USER:PASS@host:port/render/d-solo/panelid/panelname?orgId=1&from=1588280400000&to=1592341199999&panelId=16&width=1000&height=500&tz=Europe%2FKiev" > d:/test2.png
But it takes 1min 2 seconds to save an image, while saving of regular panel (not Plotly) takes 1-2seconds.
Does anyone know while it takes so long?

@emanuelepica
Copy link
Author

Thank you @Alexadra, I will try this solution and let you know if it works and how much time the rendering requires

@emanuelepica
Copy link
Author

Hi @Alexadra, unfortunately this solution doesn't work for me...moreover, if it takes more than 1 min I think that we will need to find a better solution to solve this issue. thanks, any other ideas from someone else?

@MarcoMartines
Copy link

+1 I'm trying to generate a pdf export of the plotly graphs using grafana-reporter which uses grafana render plugin.
I'm able to generate the pdf or (it is the same, share direct link rendered image) using another graph type but when i try with plotly i receive following error:

`2020/08/06 13:08:00 Called with api Token: eyJrIjoiV1Q5bXduUkN6RWE5UTFlZ3NZdEhHSEhEOUNHT0J1d2UiLCJuIjoiUERGIEV4cG9ydCIsImlkIjoxfQ==
2020/08/06 13:08:00 Called without variable
2020/08/06 13:08:00 Called with dashboard: ve23ECgMz
2020/08/06 13:08:00 Called with time range: {now-1h now}
2020/08/06 13:08:00 Connecting to dashboard at http://localhost:3000/api/dashboards/uid/ve23ECgMz
2020/08/06 13:08:00 Populated dashboard datastructure: {Title:APS Ele Query Description: VariableValues: Rows:[] Panels:[{Id:4 Type:natel-plotly-panel Title:$channel - $drivera vs. $driverb GridPos:{H:10 W:24 X:0 Y:0}}]}
2020/08/06 13:08:00 Downloading image 4 http://localhost:3000/render/d-solo/ve23ECgMz/_?from=now-1h&height=500&panelId=4&theme=light&to=now&width=1000
2020/08/06 13:09:02 Error obtaining render for panel {Id:4 Type:natel-plotly-panel Title:$channel - $drivera vs. $driverb GridPos:{H:10 W:24 X:0 Y:0}}, Status: 500, Retrying after 10s...
2020/08/06 13:10:14 Error obtaining render for panel {Id:4 Type:natel-plotly-panel Title:$channel - $drivera vs. $driverb GridPos:{H:10 W:24 X:0 Y:0}}, Status: 500, Retrying after 20s...
2020/08/06 13:31:08 Error obtaining render:

<title>Grafana - Error</title>

<base href="/" />

<link rel="stylesheet" href="public/build/grafana.dark.41bc4b193210d0f899b3.css">

<link rel="icon" type="image/png" href="public/img/fav32.png">
<link rel="mask-icon" href="public/img/grafana_mask_icon.svg" color="#F05A28">

Grafana / Server Error

Sadly something went wrong
Timeout error. You can set timeout in seconds with &timeout url parameter

    <div style="padding: 2rem 0 0">
      <p>Check the Grafana server logs for the detailed error message.</p>
    </div>
  </div>
</div>

2020/08/06 13:31:08 Error creating image for panel: error getting panel {Id:4 Type:natel-plotly-panel Title:$channel - $drivera vs. $driverb GridPos:{H:10 W:24 X:0 Y:0}}: Error obtaining render: 500 Internal Server Error
2020/08/06 13:31:08 Error generating report: error rendering PNGs in parralel for dash {Title:APS Ele Query Description: VariableValues: Rows:[] Panels:[{Id:4 Type:natel-plotly-panel Title:$channel - $drivera vs. $driverb GridPos:{H:10 W:24 X:0 Y:0}}]}: error getting panel {Id:4 Type:natel-plotly-panel Title:$channel - $drivera vs. $driverb GridPos:{H:10 W:24 X:0 Y:0}}: Error obtaining render: 500 Internal Server Error`

I've tried also the fixed proposed in some other issue (changing the line 520 of module.ts in plotly plugin) but nothing changed.

Do you have any advice?

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

3 participants