snuids / trafficlights-panel

A Grafana version of the Kibana Traffic Lights Panel
MIT License
22 stars 13 forks source link

Traffic light signal does not work with grafana image renderer plugin #15

Open srihari906 opened 4 years ago

srihari906 commented 4 years ago

What happened: Grafana Image Renderer, Rendering failed when rendering Traffic light panel. I am getting following error message. {"ignoresHttpsErrors":false,"args":["--no-sandbox"],"dumpio":false,"verboseLogging":false,"level":"info","message":"Browser initiated"} {"level":"info","message":"HTTP Server started, listening at http://localhost:8081"} {"msg":"Failed to load resource: the server responded with a status of 403 (Forbidden)","url":"http://localhost:3000/api/datasources/proxy/2/tasQuery","level":"error","message":"Browser console error"} {"url":"/render?domain=localhost&encoding=&height=500&renderKey=rKaZ17sFy3PUom2syFYc05Xh4RBL27u4%3FImpersonate%3D%23&timeout=60&timezone=Asia%2FCalcutta&url=http%3A%2F%2Flocalhost%3A3000%2Fd-solo%2F2i6zXkqZk%2Fnew-dashboard-copy%3Ftab%3Dvisualization%26orgId%3D2%26panelId%3D2%26from%3D1584776486007%26to%3D1587368486008%26width%3D1000%26height%3D500%26tz%3DAsia%252FCalcutta%26render%3D1&width=1000","stack":"TimeoutError: waiting for function failed: timeout 60000ms exceeded\n at new WaitTask (C:\Users\username\go\github.com\grafana\grafana\grafana-image-renderer\node_modules\puppeteer\lib\DOMWorld.js:549:28)\n at DOMWorld.waitForFunction (C:\Users\username\go\github.com\grafana\grafana\grafana-image-renderer\node_modules\puppeteer\lib\DOMWorld.js:454:12)\n at Frame.waitForFunction (C:\Users\username\go\github.com\grafana\grafana\grafana-image-renderer\node_modules\puppeteer\lib\FrameManager.js:657:28)\n at Page.waitForFunction (C:\Users\username\go\github.com\grafana\grafana\grafana-image-renderer\node_modules\puppeteer\lib\Page.js:1144:29)\n at Browser. (C:\Users\username\go\github.com\grafana\grafana\grafana-image-renderer\build\browser\browser.js:131:24)\n at Generator.next ()\n at fulfilled (C:\Users\username\go\github.com\grafana\grafana\grafana-image-renderer\build\browser\browser.js:4:58)\n at processTicksAndRejections (internal/process/task_queues.js:97:5)","level":"error","message":"Request failed"}

What you expected to happen: No Error, it should be render an image of Traffic light panel.

How to reproduce it (as minimally and precisely as possible):

Run the grafana in local environment - http://localhost:3000 Run the grafana-image-renderer server with - node build/app.js server --port=8081 Create a dashboard panel with traffic light plugin. Click on Share menu in Panel Edit popup. It will open a Share Panel popup window with an option "Direct link rendered image". Once click on this link it will open a new window with rendered image. it is working for other visualization plugins(Graph, Stat, Guage, Polystat, Worldmap, etc..) except traffic light plugin. Anything else we need to know?:

Environment:

Grafana version: 6.6.1 Data source type & version: Elasticsearch & Latest Version OS Grafana is installed on: Windows User OS & Browser: Windows & Chrome Grafana plugins: Traffic Light Plugin https://grafana.com/grafana/plugins/snuids-trafficlights-panel Others:

traffic-light-share traffic-light-panel traffic-light-direct-link traffic-light-render-failed

Please check the issue raised in grafana issues, got replay from few folks. https://github.com/grafana/grafana/issues/23689

techxel commented 3 years ago

yeah, I met the same problem

sanemogi commented 3 years ago

Hello, anybody got a solution on this problem ?

sanemogi commented 3 years ago

The error I get : t=2020-11-17T18:42:12+0200 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/render/d-solo/6Qnlqj2Gz/zabbix-server-dashboard status=500 remote_addr=172.16.30.137 time_ms=62006 size=1783 referer="http://172.16.11.13:3000/d/6Qnlqj2Gz/zabbix-server-dashboard?orgId=1&from=now-1h&to=now" t=2020-11-17T18:42:12+0200 lvl=eror msg="Render request failed" logger=plugins.backend pluginId=grafana-image-renderer url="http://localhost:3000/d-solo/6Qnlqj2Gz/zabbix-server-dashboard?orgId=1&from=1605627731040&to=1605631331040&panelId=6&width=1000&height=500&tz=Europe%2FAthens&render=1" error="TimeoutError: waiting for function failed: timeout 60000ms exceeded"

AnushaBoggarapu commented 3 years ago

I fixed this issue in https://github.com/snuids/trafficlights-panel/pull/19

techxel commented 3 years ago

I fixed this issue in #19

Thanks so much, it works well now. By the way, could you please sign the plugin and upload to the Labs, because we cannot use it in grafana8.0+ directly, thanks.