Coder Social home page Coder Social logo

grafana-websocket-plugin's Introduction

WebSocket Data Source for Grafana

A WebSocket data source plugin for realtime data updates in Grafana Dashboards.

Plugin Purpose

This plugin allows you to connect a WebSocket endpoint as a Data Source for your Grafana dashboard. Unlike REST APIs, WebSockets automatically update as soon as new data is available from the source, without having to periodically fetch data from it.

How it works

When a WebSocket endpoint is added as a data source in Grafana, the plugin will open the WebSocket connection with the source API and keep it open. When there is new data, the WebSocket endpoint will send it directly to the plugin through the open WebSocket connection and your dashboard will be updated automatically.

Using the WebSocket Data Source

Here are the steps to configure and use the WebSocket Data Source Plugin in Grafana.

Configure Data Source

  1. Add the WebSocket data source plugin in Grafana

    • Click the gear icon on the left sidebar and choose "data sources"
    • Click "Add data source"
    • Scroll to the bottom and chose "WebSocket API" in the "Others" category.
  2. Configure WebSocket endpoint information Grafana Websockets Configuration

    • WebSocket Host (use this format): wss://your-host/some/prefix-path
    • Add Query Parameters and Custom Headers if necessary (consult your WebSocket API data source). This example shows the use of an API key.
  3. Add a panel to the Grafana Dashboard to begin seeing data

    • Click + in the left sidebar. Choose "Dashboard" --> "Add a new panel"
    • Select WebSocket API as Data Source in the select drop-down
    • In the bottom left, set the "Fields" tab to $
    • Click the "Path" tab and set the path (if necessary) of the websocket endpoint that you want to connect
    • Above the panel, click the "Table view" toggle at the top of the window
    • Any data coming from the WebSocket Endpoint will be shown as JSON in the panel

    Graphana showing stream json packets

Customizing Your Data View

Once you have confirmed that you are receiving realtime data, it can be visualized:

  1. Make sure that Table View is turned off and choose any kind of compatible graphic from the upper right "Visualizations" list.

  2. Choose "Last 5 minutes" from the time selection window in the upper right corner of the graph.

    Graphana WebSockets Graph

grafana-websocket-plugin's People

Contributors

chireia avatar miguel91it avatar mountainash avatar szczys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grafana-websocket-plugin's Issues

websocket issues with basic auth within HTTPS

Dear Golioth,

Thanks again for your plugin. I have been struggling to get basic authentication and HTTPS to work, via an apache proxy. I got this working with my HTTPS test client. However, the connection is not set-up when I try the same with the websocket-plugin under grafana, could it be disgarded within the websocket plugin?

The websocket-plugin works fine when grafana and the websocket are used directly (not web-proxied), but this would not be secure enough to open up to the wolves on the Internet.

The reason to use basic authentication (Oauth2 may be acceptable alternative), is that users with access to grafana should only be allowed to get the live data for a selection of sensors, the X-auth key would allow usage to every user that can select/use the datasource in a dashboard. Furthermore, changing access for users becomes easier with basic authentication since that can be administrated centrally in the proxy server that handles the authentication members&groups, else the X-auth key may need to change for each member/group change, and probably needs to be different for each datasource, i.e. smells like a maintenance nightmare. Additionally, some users want to use the same websocket for other purposes without Grafana, so it still needs to be protected independent from Grafana.

Regular websocket test client connection using test html client works though a primary (HTTPS+auth) and secondary web proxy (ssh-tunneled HTTP site with sensors):

Primary web-proxy with HTTPS and authentication to wss://<domain>:<port>:

192.168.2.254 - dennis [13/Sep/2022:09:11:08 +0000] "GET /nl/enschede/lab/busbar/testws/rms_min HTTP/2.0" 200 4998 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0"
192.168.2.254 - dennis [13/Sep/2022:09:11:08 +0000] "GET /nl/enschede/lab/busbar/testws/rms_min HTTP/2.0" 200 4998 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0"

Secondary web-proxy with HTTP proxying for a remote sensor group:

::1 - - [13/Sep/2022:09:12:09 +0000] "GET /busbar/testws/rms_min?testws HTTP/1.1" 200 5077 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0"

[Tue Sep 13 09:12:09.438837 2022] [proxy:debug] [pid 347017:tid 281470950175104] proxy_util.c(2532): AH00942: http: has acquired connection for (localhost)
[Tue Sep 13 09:12:09.441325 2022] [proxy:debug] [pid 347017:tid 281470950175104] proxy_util.c(3277): AH02824: http: connection established with [::1]:5000 (localhost)
[Tue Sep 13 09:12:09.441995 2022] [proxy:debug] [pid 347017:tid 281470950175104] proxy_util.c(3463): AH00962: http: connection complete to [::1]:5000 (localhost)
[Tue Sep 13 09:12:09.455120 2022] [proxy:debug] [pid 347017:tid 281470950175104] proxy_util.c(2547): AH00943: http: has released connection for (localhost)
[Tue Sep 13 09:12:09.455396 2022] [proxy:debug] [pid 347017:tid 281470950175104] proxy_util.c(3387): [remote ::1:5000] AH02642: proxy: connection shutdown
[Tue Sep 13 09:12:09.536440 2022] [proxy:debug] [pid 347017:tid 281471302472064] proxy_util.c(2547): AH00943: http: has released connection for (localhost)
[Tue Sep 13 09:12:09.536694 2022] [xml2enc:debug] [pid 347017:tid 281471302472064] mod_xml2enc.c(195): [client ::1:41466] AH01430: Content-Type is text/plain; charset=utf-8
[Tue Sep 13 09:12:09.536819 2022] [xml2enc:info] [pid 347017:tid 281471302472064] [client ::1:41466] AH01431: Got charset utf-8 from HTTP headers
[Tue Sep 13 09:12:09.543584 2022] [authz_core:debug] [pid 347088:tid 281471445082496] mod_authz_core.c(843): [client ::1:41470] AH01628: authorization result: granted (no directives)
[Tue Sep 13 09:12:09.543873 2022] [core:debug] [pid 347088:tid 281471445082496] protocol.c(2455): [client ::1:41470] AH03155: select protocol from h2,h2c,http/1.1, choices=WebSocket for server ::1
[Tue Sep 13 09:12:09.544014 2022] [http2:debug] [pid 347088:tid 281471445082496] h2_switch.c(90): [client ::1:41470] AH03085: upgrade without HTTP2-Settings declined
[Tue Sep 13 09:12:09.544373 2022] [core:debug] [pid 347088:tid 281471445082496] protocol.c(2519): [client ::1:41470] AH03157: selected protocol=(none)
[Tue Sep 13 09:12:09.544535 2022] [proxy:debug] [pid 347088:tid 281471445082496] mod_proxy.c(1503): [client ::1:41470] AH01143: Running scheme ws handler (attempt 0)
[Tue Sep 13 09:12:09.544667 2022] [proxy:debug] [pid 347088:tid 281471445082496] proxy_util.c(2532): AH00942: ws: has acquired connection for (busbar)
[Tue Sep 13 09:12:09.544946 2022] [proxy:debug] [pid 347088:tid 281471445082496] proxy_util.c(2588): [client ::1:41470] AH00944: connecting ws://busbar:5000/ws/rms_min to busbar:5000
[Tue Sep 13 09:12:09.546044 2022] [proxy:debug] [pid 347088:tid 281471445082496] proxy_util.c(2811): [client ::1:41470] AH00947: connected /ws/rms_min to busbar:5000
[Tue Sep 13 09:12:09.548749 2022] [proxy:debug] [pid 347088:tid 281471445082496] proxy_util.c(3277): AH02824: ws: connection established with 192.168.11.2:5000 (busbar)
[Tue Sep 13 09:12:09.548981 2022] [proxy:debug] [pid 347088:tid 281471445082496] proxy_util.c(3463): AH00962: ws: connection complete to 192.168.11.2:5000 (busbar)
[Tue Sep 13 09:12:09.553693 2022] [proxy_http:debug] [pid 347088:tid 281471445082496] mod_proxy_http.c(1478): [client ::1:41470] AH10239: HTTP: tunneling protocol websocket
[Tue Sep 13 09:12:09.591900 2022] [authz_core:debug] [pid 347017:tid 281470933389696] mod_authz_core.c(843): [client ::1:41474] AH01628: authorization result: granted (no directives)
[Tue Sep 13 09:12:09.592115 2022] [proxy:debug] [pid 347017:tid 281470933389696] mod_proxy.c(1503): [client ::1:41474] AH01143: Running scheme http handler (attempt 0)
[Tue Sep 13 09:12:09.592186 2022] [proxy:debug] [pid 347017:tid 281470933389696] proxy_util.c(2532): AH00942: http: has acquired connection for (localhost)

Connection accepted in my websocket server (rtd_web):

rtd_web: 2022/09/13 09:12:09 &{GET /ws/rms_min HTTP/1.1 1 1 map[Accept:[*/*] Accept-Language:[en-US,en;q=0.5] Authorization:[Basic Z***] Cache-Control:[no-cache] Connection:[Upgrade] Dnt:[1] Origin:[https://<domain>:<port>] Pragma:[no-cache] Sec-Fetch-Dest:[websocket] Sec-Fetch-Mode:[websocket] Sec-Fetch-Site:[same-origin] Sec-Websocket-Extensions:[permessage-deflate] Sec-Websocket-Key:[X**] Sec-Websocket-Version:[13] Upgrade:[WebSocket] User-Agent:[Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0] X-Forwarded-For:[192.168.2.254, ::1] X-Forwarded-Host:[<domain>:<port>, <domain>:<port>] X-Forwarded-Server:[<domain>, ::1]] {} <nil> 0 [] false <domain>:<port> map[] map[] <nil> map[] 192.168.11.1:35042 /ws/rms_min <nil> <nil> <nil> 0x400032e570}
rtd_web: 2022/09/13 09:12:09 ################Request Headers################
Authorization : [Basic Z***]
Sec-Websocket-Extensions : [permessage-deflate]
Pragma : [no-cache]
X-Forwarded-For : [192.168.2.254, ::1]
X-Forwarded-Server : [<domain>, ::1]
Accept : [*/*]
Sec-Websocket-Version : [13]
Dnt : [1]
X-Forwarded-Host : [<domain>:<port>, <domain>:<port>]
Upgrade : [WebSocket]
User-Agent : [Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0]
Origin : [https://<domain>:<port>]
Sec-Websocket-Key : [X***]
Sec-Fetch-Dest : [websocket]
Sec-Fetch-Mode : [websocket]
Sec-Fetch-Site : [same-origin]
Cache-Control : [no-cache]
Connection : [Upgrade]
Accept-Language : [en-US,en;q=0.5]
rtd_web: 2022/09/13 09:12:09 Received new Client connection
rtd_web: 2022/09/13 09:12:09 Client upgrade to WS success
rtd_web: 2022/09/13 09:12:09 Subscribing to VT_DSPs_Median_rms:rms_min on channel 0x40001000c0
rtd_web: 2022/09/13 09:12:09 The Received Message type is 1 
rtd_web: 2022/09/13 09:12:09 The Received Message is [72 105 32 83 101 114 118 101 114 46 32 73 109 32 74 83 32 67 108 105 101 110 116] 

Unfortunately, grafana websocket connection breaks and does not end up in any connection to my websocket server:

192.168.2.254 - dennis [13/Sep/2022:10:54:34 +0000] "POST /nl/enschede/lab/nl/enschede/lab/gf/api/ds/query HTTP/2.0" 200 387 "https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now" "Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0"
192.168.2.254 - dennis [13/Sep/2022:10:54:34 +0000] "POST /nl/enschede/lab/nl/enschede/lab/gf/api/ds/query HTTP/2.0" 200 394 "https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now" "Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0"
192.168.2.254 - dennis [13/Sep/2022:10:54:34 +0000] "GET /nl/enschede/lab/nl/enschede/lab/gf/api/annotations?from=1663066174558&to=1663066474558&limit=100&matchAny=false&dashboardUID=IK5EXKM4z HTTP/2.0" 200 223 "https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now" "Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0"
192.168.2.254 - dennis [13/Sep/2022:10:54:42 +0000] "GET /nl/enschede/lab/gf/api/live/ws HTTP/1.1" 400 5613 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0"

And on secondary proxy:

::1 - - [13/Sep/2022:10:54:34 +0000] "POST /nl/enschede/lab/gf/api/ds/query HTTP/1.1" 200 487 "https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now" "Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0"
::1 - - [13/Sep/2022:10:54:34 +0000] "POST /nl/enschede/lab/gf/api/ds/query HTTP/1.1" 200 494 "https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now" "Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0"
::1 - - [13/Sep/2022:10:54:34 +0000] "GET /nl/enschede/lab/gf/api/annotations?from=1663066174558&to=1663066474558&limit=100&matchAny=false&dashboardUID=IK5EXKM4z HTTP/1.1" 200 319 "https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now" "Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0"
::1 - - [13/Sep/2022:10:54:42 +0000] "GET /nl/enschede/lab/gf/api/live/ws HTTP/1.1" 400 338 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0"

[Tue Sep 13 10:54:33.827997 2022] [proxy:debug] [pid 349793:tid 281472510431616] proxy_util.c(2547): AH00943: http: has released connection for (localhost)
[Tue Sep 13 10:54:33.828138 2022] [proxy:debug] [pid 349793:tid 281472510431616] proxy_util.c(3387): [remote ::1:5000] AH02642: proxy: connection shutdown
[Tue Sep 13 10:54:34.629584 2022] [authz_core:debug] [pid 349793:tid 281472015524224] mod_authz_core.c(843): [client ::1:54676] AH01628: authorization result: granted (no directives), referer: https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now
[Tue Sep 13 10:54:34.629801 2022] [authz_core:debug] [pid 349863:tid 281471881306496] mod_authz_core.c(843): [client ::1:54678] AH01628: authorization result: granted (no directives), referer: https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now
[Tue Sep 13 10:54:34.629856 2022] [proxy:debug] [pid 349793:tid 281472015524224] mod_proxy.c(1503): [client ::1:54676] AH01143: Running scheme http handler (attempt 0), referer: https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now
[Tue Sep 13 10:54:34.629955 2022] [proxy:debug] [pid 349793:tid 281472015524224] proxy_util.c(2532): AH00942: http: has acquired connection for (localhost)
[Tue Sep 13 10:54:34.630017 2022] [proxy:debug] [pid 349793:tid 281472015524224] proxy_util.c(2588): [client ::1:54676] AH00944: connecting http://localhost:3000/nl/enschede/lab/gf/api/ds/query to localhost:3000, referer: https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now
[Tue Sep 13 10:54:34.630015 2022] [proxy:debug] [pid 349863:tid 281471881306496] mod_proxy.c(1503): [client ::1:54678] AH01143: Running scheme http handler (attempt 0), referer: https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now
[Tue Sep 13 10:54:34.630084 2022] [proxy:debug] [pid 349793:tid 281472015524224] proxy_util.c(2811): [client ::1:54676] AH00947: connected /nl/enschede/lab/gf/api/ds/query to localhost:3000, referer: https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now
[Tue Sep 13 10:54:34.630220 2022] [proxy:debug] [pid 349863:tid 281471881306496] proxy_util.c(2532): AH00942: http: has acquired connection for (localhost)
[Tue Sep 13 10:54:34.630279 2022] [proxy:debug] [pid 349863:tid 281471881306496] proxy_util.c(2588): [client ::1:54678] AH00944: connecting http://localhost:3000/nl/enschede/lab/gf/api/ds/query to localhost:3000, referer: https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now
[Tue Sep 13 10:54:34.630344 2022] [proxy:debug] [pid 349863:tid 281471881306496] proxy_util.c(2811): [client ::1:54678] AH00947: connected /nl/enschede/lab/gf/api/ds/query to localhost:3000, referer: https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now
[Tue Sep 13 10:54:34.675069 2022] [authz_core:debug] [pid 349863:tid 281471872913792] mod_authz_core.c(843): [client ::1:54680] AH01628: authorization result: granted (no directives), referer: https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now
[Tue Sep 13 10:54:34.675365 2022] [proxy:debug] [pid 349863:tid 281471872913792] mod_proxy.c(1503): [client ::1:54680] AH01143: Running scheme http handler (attempt 0), referer: https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now
[Tue Sep 13 10:54:34.675466 2022] [proxy:debug] [pid 349863:tid 281471872913792] proxy_util.c(2532): AH00942: http: has acquired connection for (localhost)
[Tue Sep 13 10:54:34.675529 2022] [proxy:debug] [pid 349863:tid 281471872913792] proxy_util.c(2588): [client ::1:54680] AH00944: connecting http://localhost:3000/nl/enschede/lab/gf/api/annotations?from=1663066174558&to=1663066474558&limit=100&matchAny=false&dashboardUID=IK5EXKM4z to localhost:3000, referer: https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now
[Tue Sep 13 10:54:34.675604 2022] [proxy:debug] [pid 349863:tid 281471872913792] proxy_util.c(2811): [client ::1:54680] AH00947: connected /nl/enschede/lab/gf/api/annotations?from=1663066174558&to=1663066474558&limit=100&matchAny=false&dashboardUID=IK5EXKM4z to localhost:3000, referer: https://<domain>:<port>/nl/enschede/lab/gf/d/IK5EXKM4z/test_ws?orgId=1&var-signal=rms&var-signal=rms_median&var-sensor=VT&var-source=wsVT-lab%20https&from=now-5m&to=now
[Tue Sep 13 10:54:34.676565 2022] [proxy:debug] [pid 349863:tid 281471872913792] proxy_util.c(3277): AH02824: http: connection established with [::1]:3000 (localhost)
[Tue Sep 13 10:54:34.676800 2022] [proxy:debug] [pid 349863:tid 281471872913792] proxy_util.c(3463): AH00962: http: connection complete to [::1]:3000 (localhost)
[Tue Sep 13 10:54:34.737240 2022] [proxy:debug] [pid 349793:tid 281472015524224] proxy_util.c(2547): AH00943: http: has released connection for (localhost)
[Tue Sep 13 10:54:34.738698 2022] [proxy:debug] [pid 349863:tid 281471881306496] proxy_util.c(2547): AH00943: http: has released connection for (localhost)
[Tue Sep 13 10:54:34.749325 2022] [proxy:debug] [pid 349863:tid 281471872913792] proxy_util.c(2547): AH00943: http: has released connection for (localhost)

Kind regards,
Dennis

Possibility to mix it with query datasource

Hi, is it possible to mix this datasource with normal queries from a database to connect the datapoints with information not coming from a websocket?
I have the "Mixed Datasource" in mind, but when mixing, no results are displaying.

Working with non JSON message

Hi, my websockets data message is not in JSON format, and the plugin gives me error (tested with JSON and it works). How can I use messages sent as plain text or other formats?
thank you

image

image

Data Persistence/ Historical Data

Hey there.

I was wondering if there were any plans to support data persistence so as to show historical data for graphs populated by this plugin?

Presently I have a dashboard which uses this plugin, but when I reload the page all of the historical data from the websocket is missing.

Behind the Scenes Data Capture

Hi There!

Are there any plans to add backend data capture capabilities? At present I have a dashboard that uses this plugin, however I must keep the dashboard open in order to capture the data.

I think it would be a massive benefit if the plugin kept a connection open to the websocket and continued to capture the data irrespective of whether the dashboard is open.

How to send initial JSON payload?

Relatively new to Websockets. Let's say I need to send the following JSON payload to the WSS endpoint:

url = "wss://kintsugi-rpc.dwellir.com"
from pprint import pprint

payload = json.dumps(
{
"id": 1,
"jsonrpc": "2.0",
"method": "vaultRegistry_getPremiumRedeemVaults",
"params": []
}
)

How do I that here?

Data Limit

Hello there,
thanks for this great plugin. Is there something like a limit I can set so that data points are getting forget? Makes me feel troubled to see my array size growing. Or am I missing something?
Thanks!

Problem at "yarn install"

Trying to setup on my ubuntu 20.04 server, ran into the following issue at the "yarn install" step:

ramb0t@vps:~/Golioth/Codes/grafana-plugins/grafana-websocket-plugin$ yarn install
yarn install v1.22.17
[1/5] Validating package.json...
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=14". Got "10.19.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

this just after installing yarn with " npm install --global yarn "

Disconnect causes "plugin unavailable" error.

I installed the Giolith Websocket plug-in and configured my data source pointing to a custom application with a websocket server. I get data and can render it in Grafana. But when my server is stopped (debugging), the Websocket plug-in can never seem to reconnect. In fact, the only way to get the plug-in to work again is to completely uninstall, re-install, and reconfigure the data source.

I am running Grafana a Docker container. Here are the log messages I receive when the server stops and is restarted.

logger=live.runstream t=2023-03-07T13:40:08.8821326Z level=error msg="Error running stream, re-establishing" path=/ error="error running stream: rpc error: code = Unknown desc = connection Error: dial tcp 192.168.68.135:9991: connect: connection refused" wait=800ms
logger=plugin.golioth-websocket-datasource t=2023-03-07T13:40:10.4950601Z level=info msg="RunStream called" Path=/
logger=plugin.golioth-websocket-datasource t=2023-03-07T13:40:10.4951684Z level=info msg="Ws Connect" connectingto=ws://192.168.68.135:9991/
logger=plugin.golioth-websocket-datasource t=2023-03-07T13:40:10.6858652Z level=info msg="Ws Connect" connectedto=ws://192.168.68.135:9991/
logger=plugin.golioth-websocket-datasource t=2023-03-07T13:42:20.1995157Z level=info msg="Read Message routine" detail="closing websocket connection and msgRead channel"
logger=live.runstream t=2023-03-07T13:42:20.2046074Z level=error msg="Error running stream, re-establishing" path=/ error="error running stream: rpc error: code = Unavailable desc = error reading from server: EOF" wait=1.6s
logger=live.runstream t=2023-03-07T13:42:20.2379297Z level=error msg="Error running stream, re-establishing" path=/ error="plugin unavailable" wait=0s
logger=live.runstream t=2023-03-07T13:42:20.2490461Z level=error msg="Error running stream, re-establishing" path=/ error="plugin unavailable" wait=0s
logger=live.runstream t=2023-03-07T13:42:20.460919Z level=error msg="Error running stream, re-establishing" path=/ error="plugin unavailable" wait=200ms
logger=live.runstream t=2023-03-07T13:42:20.8723485Z level=error msg="Error running stream, re-establishing" path=/ error="plugin unavailable" wait=400ms
logger=live.runstream t=2023-03-07T13:42:21.6856954Z level=error msg="Error running stream, re-establishing" path=/ error="plugin unavailable" wait=800ms
logger=live.runstream t=2023-03-07T13:42:23.2978163Z level=error msg="Error running stream, re-establishing" path=/ error="plugin unavailable" wait=1.6s
logger=live.runstream t=2023-03-07T13:42:26.5325128Z level=error msg="Error running stream, re-establishing" path=/ error="plugin unavailable" wait=3.2s
logger=context userId=1 orgId=1 uname=admin t=2023-03-07T13:42:29.9604303Z level=info msg="Request Completed" method=GET path=/api/live/ws status=-1 remote_addr=172.17.0.1 time_ms=33 duration=33.4763ms size=0 referer= handler=/api/live/ws
logger=live.features t=2023-03-07T13:42:30.2761713Z level=error msg="Plugin OnSubscribe call error" error="plugin unavailable" path=/
logger=live t=2023-03-07T13:42:30.2762282Z level=error msg="Error calling channel handler subscribe" user=1 client=ad3122c2-bec1-40c1-b27d-0dd23324dfe5 channel=1/ds/-USzCRaVz// error="plugin unavailable"
logger=live.runstream t=2023-03-07T13:42:31.5679795Z level=error msg="Error running stream, re-establishing" path=/ error="plugin unavailable" wait=5s
logger=live.features t=2023-03-07T13:42:32.1847032Z level=error msg="Plugin OnSubscribe call error" error="plugin unavailable" path=/
logger=live t=2023-03-07T13:42:32.1847885Z level=error msg="Error calling channel handler subscribe" user=1 client=ad3122c2-bec1-40c1-b27d-0dd23324dfe5 channel=1/ds/-USzCRaVz// error="plugin unavailable"
logger=live.features t=2023-03-07T13:42:34.1933098Z level=error msg="Plugin OnSubscribe call error" error="plugin unavailable" path=/
logger=live t=2023-03-07T13:42:34.1933928Z level=error msg="Error calling channel handler subscribe" user=1 client=ad3122c2-bec1-40c1-b27d-0dd23324dfe5 channel=1/ds/-USzCRaVz// error="plugin unavailable"
logger=live.runstream t=2023-03-07T13:42:36.5496082Z level=error msg="Error running stream, re-establishing" path=/ error="plugin unavailable" wait=5s
logger=live.features t=2023-03-07T13:42:37.1268603Z level=error msg="Plugin OnSubscribe call error" error="plugin unavailable" path=/
logger=live t=2023-03-07T13:42:37.1269211Z level=error msg="Error calling channel handler subscribe" user=1 client=ad3122c2-bec1-40c1-b27d-0dd23324dfe5 channel=1/ds/-USzCRaVz// error="plugin unavailable"
logger=live.features t=2023-03-07T13:42:41.8701649Z level=error msg="Plugin OnSubscribe call error" error="plugin unavailable" path=/
logger=live t=2023-03-07T13:42:41.870216Z level=error msg="Error calling channel handler subscribe" user=1 client=ad3122c2-bec1-40c1-b27d-0dd23324dfe5 channel=1/ds/-USzCRaVz// error="plugin unavailable"
logger=live.features t=2023-03-07T13:42:47.8868736Z level=error msg="Plugin OnSubscribe call error" error="plugin unavailable" path=/
logger=live t=2023-03-07T13:42:47.8869443Z level=error msg="Error calling channel handler subscribe" user=1 client=ad3122c2-bec1-40c1-b27d-0dd23324dfe5 channel=1/ds/-USzCRaVz// error="plugin unavailable"
logger=live.features t=2023-03-07T13:42:56.1317842Z level=error msg="Plugin OnSubscribe call error" error="plugin unavailable" path=/
logger=live t=2023-03-07T13:42:56.1318718Z level=error msg="Error calling channel handler subscribe" user=1 client=ad3122c2-bec1-40c1-b27d-0dd23324dfe5 channel=1/ds/-USzCRaVz// error="plugin unavailable"
logger=live.features t=2023-03-07T13:43:11.3021335Z level=error msg="Plugin OnSubscribe call error" error="plugin unavailable" path=/
logger=live t=2023-03-07T13:43:11.302213Z level=error msg="Error calling channel handler subscribe" user=1 client=ad3122c2-bec1-40c1-b27d-0dd23324dfe5 channel=1/ds/-USzCRaVz// error="plugin unavailable"

I suspect I am doing something wrong. Any suggestions?

websocket issue due to the authentication process (http headers)

Dear Golioth,

Thanks for this plug-in.
I'm trying to use it getting market data from websocket. But I'm not able to get the connection done, because I think the issue is with the authentication process in order to create the connection, that is not possible with the websocket API plug-in.
Websocket connections must be authenticated by signing the request and sending the signature in HTTP headers.
How can I do this in your plug-in ? I'm only able to put headers as the connection is already created, that can't work in my case.

Thank you.

Socket IO not supported

Hi,

I have python Socket IO server based on

from flask import Flask, jsonify, request
from flask_socketio import SocketIO
from flask_cors import CORS
import logging

# Flask and SocketIO setup
app = Flask(__name__)
socketio = SocketIO(app, cors_allowed_origins="*", engineio_logger=True)  # Initialize SocketIO once

# Flask CORS
CORS(app, resources={r"/*": {"origins": "*"}})

@socketio.on("connect")
def handle_connect():
    logging.info("Client connected")
...
@socketio.on("disconnect")
def handle_disconnect():
    logging.info("Client disconnected")

if __name__ == "__main__":
    logging.basicConfig(level=logging.DEBUG)
    socketio.run(
        app, host="0.0.0.0", port=20003, debug=False, allow_unsafe_werkzeug=True,
    )

It seems that Socket IO is not supported by this plugin at the moment. When I try to create a connection in Grafana (locally), I receive :
Query A - Starting WebSocket: connection Error: websocket: bad handshake"
On server side I get 404 bad request...

  1. I think there should be support for Socket IO for this plugin since it is pretty common.
  2. Can u give point me to the WebSocket server implementation, which is compatible with grafana-websocket-plugin?

Thank you!
Best from
TD

`url` field not prefilled when using Provisioning config file

When going in to edit the Data Sources on Grafana the host/endpoint is correctly shown in the "Overview" of data sources.

The Grafana Data Sources overview screen

But when you click through to edit/see all the settings for the WebSocket API data source the "Host" input field is empty.

WebSocket API data source settings screen

To be consistent with other Data Sources this should contain the same value set by the Provisioning config file url value.

  - name: WebSocket API
    type: golioth-websocket-datasource
    orgId: 1
    access: proxy
    uid: grafana_wsapi
    url: ${WSAPI_URL}
    isDefault: true
    version: 1
    editable: true

Tested with Grafana v8.3.4 & WebSocket API v1.0.1

websocket connection is re-established multiple times per second

Dear Golioth,
Thanks for your plugin, I got it to work for low-speed data at the moment (1 Hz voltage median value streaming from my sensor).
image
However, when going to higher speeds (50Hz voltage values), it starts to stutter, only small bursts get through.
image

I noticed in the grafana log and in my webserver, that the connection is re-established very often because of a plugin issue (also with 1Hz data), any idea how can this be resolved?

logger=plugin.golioth-websocket-datasource t=2022-09-06T15:54:11.545393073+02:00 level=info msg="RunStream called" Path=VT/rms logger=plugin.golioth-websocket-datasource t=2022-09-06T15:54:11.545464024+02:00 level=info msg="Ws Connect" connectingto=ws://localhost:5000/ws/VT/rms logger=plugin.golioth-websocket-datasource t=2022-09-06T15:54:11.553675162+02:00 level=info msg="Ws Connect" connectedto=ws://localhost:5000/ws/VT/rms logger=plugin.golioth-websocket-datasource t=2022-09-06T15:54:11.55433726+02:00 level=info msg="Ws Connect" connectedto=ws://localhost:5000/ws/VT/rms_median logger=live.runstream t=2022-09-06T15:54:15.125926013+02:00 level=error msg="Error running stream, re-establishing" path=VT/rms error="error running stream: rpc error: code = Unavailable desc = error reading from server: EOF" wait=800ms logger=live.runstream t=2022-09-06T15:54:15.12601636+02:00 level=error msg="Error running stream, re-establishing" path=VT/rms_median error="error running stream: rpc error: code = Unavailable desc = error reading from server: EOF" wait=800ms logger=live.runstream t=2022-09-06T15:54:15.126512575+02:00 level=error msg="Error running stream, re-establishing" path=VT/rms_median error="plugin unavailable" wait=0s logger=live.runstream t=2022-09-06T15:54:15.12662357+02:00 level=error msg="Error running stream, re-establishing" path=VT/rms error="plugin unavailable" wait=0s logger=live.runstream t=2022-09-06T15:54:15.126882399+02:00 level=error msg="Error running stream, re-establishing" path=VT/rms_median error="plugin unavailable" wait=0s

When I use a test websocket client (inspired by https://fastapi.tiangolo.com/advanced/websockets/), the streaming continues without hick-ups.

image

Plugin is connected to websocket server successfully but cannot receive data

My grafana server is connected with my websocket API successfully (checked with logs file). However, when I try to send a string JSON, the plugin cannot receive and show the data. I tested my server with other clients which are all succeed to receive the JSON string. Is there any thing I need to consider when send JSON to websocket plugin?

Programming Language: Python (websockets v10)
Grafana: v8.4.4

Subscription to the channel already exists

Hi.
I often get these errors : Streaming channel error: Subscription to the channel 1/ds/IeovTUnIk//panel4/12345/12345 already exists

when i try to subscribe to a channel. Other times it's more strange because i would get the same error but for channel 5 and 8, which I don't really have, so where is this coming from?

1/ds/IeovTUnIk//panel1/5/8

The path is defined as /panel1/${dc_panel01.0}/${dc_panel01.1}

error_grafana_5_8_new

High (100%) CPU usage when plotting multiple series

We've noticed high CPU usage when creating simple dashboards displaying a few series. I have a simple test case of a Python application generating random data and a Grafana dashboard which goes to 100% CPU usage on the browser within 15 minutes (M1 Macbook Pro).

100percent CPU

The generator emits a websocket message once per second. This message consists of 100 time series, broken down into 5 "assets" of 20 time series each. This is quite small compared to our expected production workloads. The Grafana dashboard has a single time series panel, with 4 series displayed. A dashboard variable allows the dashboard to switch between viewing each of the 5 assets.

We are using Python 3.11.2 to generate the sample data with the websockets 11.0.3 package. Grafana is version 10.0.3 with v1.0.2 of grafana-websocket-plugin.

From looking at Chrome's profiler, it looks like the bulk of the time is spent in JSONPath.prototype._trace from the first entry and in JSON parsing in the second entry (in transformFrames).

Chrome profiler

There also appears to be a lot of garbage generated. Also from the Chrome profiler (but a different run) shows the heap going from ~46MB to ~200MB on a consistent, regular basis.

Chrome memory

I haven't delved any deeper into the code yet, but is it possible that the entire set of messages is being parsed and JSONPath queries being executed every time a new message is received over the web socket? I wouldn't expect so much CPU and memory usage if the JSON parsing and JSONPathEvaluation were being performed incrementally, (i.e. once per received message).

A sample WebSocket message is:

{
	"data": {
		"asset1": {
			"series1": {
				"time": "2023-07-31T02:39:52.581897+00:00",
				"value": 31.111732219573604
			},
			"series2": {
				"time": "2023-07-31T02:39:52.581926+00:00",
				"value": 63.5330379688653
			},
			"series3": {
				"time": "2023-07-31T02:39:52.581933+00:00",
				"value": 65.02248736137514
			},
			"series4": {
				"time": "2023-07-31T02:39:52.581939+00:00",
				"value": 73.41998843575468
			},
			"series5": {
				"time": "2023-07-31T02:39:52.581944+00:00",
				"value": 86.03779154886973
			},
			"series6": {
				"time": "2023-07-31T02:39:52.581949+00:00",
				"value": 65.6194646523102
			},
			"series7": {
				"time": "2023-07-31T02:39:52.581954+00:00",
				"value": 30.096497707717766
			},
			"series8": {
				"time": "2023-07-31T02:39:52.581958+00:00",
				"value": 53.743947951958866
			},
			"series9": {
				"time": "2023-07-31T02:39:52.582293+00:00",
				"value": 84.41985850757489
			},
			"series10": {
				"time": "2023-07-31T02:39:52.582299+00:00",
				"value": 37.355429126763866
			},
			"series11": {
				"time": "2023-07-31T02:39:52.582304+00:00",
				"value": 15.151001705763685
			},
			"series12": {
				"time": "2023-07-31T02:39:52.582308+00:00",
				"value": 33.86689169026734
			},
			"series13": {
				"time": "2023-07-31T02:39:52.582314+00:00",
				"value": 57.0090106838116
			},
			"series14": {
				"time": "2023-07-31T02:39:52.582318+00:00",
				"value": 32.31957583025593
			},
			"series15": {
				"time": "2023-07-31T02:39:52.582323+00:00",
				"value": 8.482657848733249
			},
			"series16": {
				"time": "2023-07-31T02:39:52.582327+00:00",
				"value": 37.309829376398504
			},
			"series17": {
				"time": "2023-07-31T02:39:52.582332+00:00",
				"value": 40.999623896430194
			},
			"series18": {
				"time": "2023-07-31T02:39:52.582336+00:00",
				"value": 30.91474376553277
			},
			"series19": {
				"time": "2023-07-31T02:39:52.582341+00:00",
				"value": 87.49841135797917
			},
			"series20": {
				"time": "2023-07-31T02:39:52.582345+00:00",
				"value": 46.632828535539396
			}
		},
		"asset2": {
			"series1": {
				"time": "2023-07-31T02:39:52.582351+00:00",
				"value": 18.585603557939766
			},
			"series2": {
				"time": "2023-07-31T02:39:52.582355+00:00",
				"value": 57.018406669961585
			},
			"series3": {
				"time": "2023-07-31T02:39:52.582360+00:00",
				"value": 43.32716313978087
			},
			"series4": {
				"time": "2023-07-31T02:39:52.582364+00:00",
				"value": 43.40153492740899
			},
			"series5": {
				"time": "2023-07-31T02:39:52.582369+00:00",
				"value": 25.593522251024506
			},
			"series6": {
				"time": "2023-07-31T02:39:52.582373+00:00",
				"value": 61.02313092462206
			},
			"series7": {
				"time": "2023-07-31T02:39:52.582378+00:00",
				"value": 73.72712691600128
			},
			"series8": {
				"time": "2023-07-31T02:39:52.582382+00:00",
				"value": 75.96536238426866
			},
			"series9": {
				"time": "2023-07-31T02:39:52.582387+00:00",
				"value": 44.34975427328715
			},
			"series10": {
				"time": "2023-07-31T02:39:52.582391+00:00",
				"value": 15.529848518015163
			},
			"series11": {
				"time": "2023-07-31T02:39:52.582396+00:00",
				"value": 40.098751969565576
			},
			"series12": {
				"time": "2023-07-31T02:39:52.582400+00:00",
				"value": 93.26790103484674
			},
			"series13": {
				"time": "2023-07-31T02:39:52.582404+00:00",
				"value": 83.70344481539355
			},
			"series14": {
				"time": "2023-07-31T02:39:52.582408+00:00",
				"value": 28.833837743651735
			},
			"series15": {
				"time": "2023-07-31T02:39:52.582413+00:00",
				"value": 4.369127386869462
			},
			"series16": {
				"time": "2023-07-31T02:39:52.582417+00:00",
				"value": 10.898625861487838
			},
			"series17": {
				"time": "2023-07-31T02:39:52.582422+00:00",
				"value": 50.41686668070026
			},
			"series18": {
				"time": "2023-07-31T02:39:52.582426+00:00",
				"value": 30.748993487654584
			},
			"series19": {
				"time": "2023-07-31T02:39:52.582431+00:00",
				"value": 71.35657017629057
			},
			"series20": {
				"time": "2023-07-31T02:39:52.582436+00:00",
				"value": 38.3809495694423
			}
		},
		"asset3": {
			"series1": {
				"time": "2023-07-31T02:39:52.582442+00:00",
				"value": 30.643587799025973
			},
			"series2": {
				"time": "2023-07-31T02:39:52.582448+00:00",
				"value": 71.2267776721094
			},
			"series3": {
				"time": "2023-07-31T02:39:52.582453+00:00",
				"value": 10.132010493040038
			},
			"series4": {
				"time": "2023-07-31T02:39:52.582457+00:00",
				"value": 24.929407598279543
			},
			"series5": {
				"time": "2023-07-31T02:39:52.582461+00:00",
				"value": 31.29253286922883
			},
			"series6": {
				"time": "2023-07-31T02:39:52.582465+00:00",
				"value": 19.522077283317635
			},
			"series7": {
				"time": "2023-07-31T02:39:52.582470+00:00",
				"value": 43.247530005114974
			},
			"series8": {
				"time": "2023-07-31T02:39:52.582474+00:00",
				"value": 30.228105838641323
			},
			"series9": {
				"time": "2023-07-31T02:39:52.582479+00:00",
				"value": 35.094002748243184
			},
			"series10": {
				"time": "2023-07-31T02:39:52.582482+00:00",
				"value": 74.04013414483143
			},
			"series11": {
				"time": "2023-07-31T02:39:52.582487+00:00",
				"value": 33.195993342594385
			},
			"series12": {
				"time": "2023-07-31T02:39:52.582491+00:00",
				"value": 22.480432120910248
			},
			"series13": {
				"time": "2023-07-31T02:39:52.582495+00:00",
				"value": 73.15460606287232
			},
			"series14": {
				"time": "2023-07-31T02:39:52.582499+00:00",
				"value": 0.9106067094319794
			},
			"series15": {
				"time": "2023-07-31T02:39:52.582504+00:00",
				"value": 45.80079656886726
			},
			"series16": {
				"time": "2023-07-31T02:39:52.582508+00:00",
				"value": 35.065531470380726
			},
			"series17": {
				"time": "2023-07-31T02:39:52.582513+00:00",
				"value": 6.408510358262506
			},
			"series18": {
				"time": "2023-07-31T02:39:52.582517+00:00",
				"value": 38.870698418860655
			},
			"series19": {
				"time": "2023-07-31T02:39:52.582522+00:00",
				"value": 22.374657540795003
			},
			"series20": {
				"time": "2023-07-31T02:39:52.582527+00:00",
				"value": 78.4203093413092
			}
		},
		"asset4": {
			"series1": {
				"time": "2023-07-31T02:39:52.582532+00:00",
				"value": 9.290502633907668
			},
			"series2": {
				"time": "2023-07-31T02:39:52.582537+00:00",
				"value": 17.08408388217194
			},
			"series3": {
				"time": "2023-07-31T02:39:52.582582+00:00",
				"value": 90.56203124331456
			},
			"series4": {
				"time": "2023-07-31T02:39:52.582588+00:00",
				"value": 58.213352971868446
			},
			"series5": {
				"time": "2023-07-31T02:39:52.582594+00:00",
				"value": 25.454428488661005
			},
			"series6": {
				"time": "2023-07-31T02:39:52.582598+00:00",
				"value": 11.898313311680464
			},
			"series7": {
				"time": "2023-07-31T02:39:52.582603+00:00",
				"value": 88.12776074535932
			},
			"series8": {
				"time": "2023-07-31T02:39:52.582608+00:00",
				"value": 83.34455717866732
			},
			"series9": {
				"time": "2023-07-31T02:39:52.582613+00:00",
				"value": 22.020829234563593
			},
			"series10": {
				"time": "2023-07-31T02:39:52.582617+00:00",
				"value": 22.46444061535176
			},
			"series11": {
				"time": "2023-07-31T02:39:52.582622+00:00",
				"value": 33.52192429914582
			},
			"series12": {
				"time": "2023-07-31T02:39:52.582625+00:00",
				"value": 22.283904092739306
			},
			"series13": {
				"time": "2023-07-31T02:39:52.582630+00:00",
				"value": 7.130853822969623
			},
			"series14": {
				"time": "2023-07-31T02:39:52.582634+00:00",
				"value": 7.841786700193415
			},
			"series15": {
				"time": "2023-07-31T02:39:52.582639+00:00",
				"value": 74.36816619053545
			},
			"series16": {
				"time": "2023-07-31T02:39:52.582643+00:00",
				"value": 78.20524202860932
			},
			"series17": {
				"time": "2023-07-31T02:39:52.582648+00:00",
				"value": 28.866178099494128
			},
			"series18": {
				"time": "2023-07-31T02:39:52.582652+00:00",
				"value": 17.84580917826871
			},
			"series19": {
				"time": "2023-07-31T02:39:52.582657+00:00",
				"value": 17.49455173548536
			},
			"series20": {
				"time": "2023-07-31T02:39:52.582661+00:00",
				"value": 94.47549261021013
			}
		},
		"asset5": {
			"series1": {
				"time": "2023-07-31T02:39:52.582666+00:00",
				"value": 12.13133879261409
			},
			"series2": {
				"time": "2023-07-31T02:39:52.582671+00:00",
				"value": 30.34177441291777
			},
			"series3": {
				"time": "2023-07-31T02:39:52.582675+00:00",
				"value": 82.16341311081666
			},
			"series4": {
				"time": "2023-07-31T02:39:52.582679+00:00",
				"value": 36.868762150764894
			},
			"series5": {
				"time": "2023-07-31T02:39:52.582684+00:00",
				"value": 71.72535233091388
			},
			"series6": {
				"time": "2023-07-31T02:39:52.582688+00:00",
				"value": 87.63281455780572
			},
			"series7": {
				"time": "2023-07-31T02:39:52.582753+00:00",
				"value": 77.30002072214205
			},
			"series8": {
				"time": "2023-07-31T02:39:52.582766+00:00",
				"value": 9.744614484234571
			},
			"series9": {
				"time": "2023-07-31T02:39:52.582775+00:00",
				"value": 25.463353723595315
			},
			"series10": {
				"time": "2023-07-31T02:39:52.582780+00:00",
				"value": 66.79971934295749
			},
			"series11": {
				"time": "2023-07-31T02:39:52.582786+00:00",
				"value": 25.330746179842286
			},
			"series12": {
				"time": "2023-07-31T02:39:52.582791+00:00",
				"value": 64.86910370930916
			},
			"series13": {
				"time": "2023-07-31T02:39:52.582797+00:00",
				"value": 76.45466840348693
			},
			"series14": {
				"time": "2023-07-31T02:39:52.582802+00:00",
				"value": 48.696411457635804
			},
			"series15": {
				"time": "2023-07-31T02:39:52.582807+00:00",
				"value": 68.58407514421128
			},
			"series16": {
				"time": "2023-07-31T02:39:52.582811+00:00",
				"value": 69.57896860374916
			},
			"series17": {
				"time": "2023-07-31T02:39:52.582816+00:00",
				"value": 64.57902167189174
			},
			"series18": {
				"time": "2023-07-31T02:39:52.582821+00:00",
				"value": 17.019976648576847
			},
			"series19": {
				"time": "2023-07-31T02:39:52.582827+00:00",
				"value": 62.962668869823915
			},
			"series20": {
				"time": "2023-07-31T02:39:52.582831+00:00",
				"value": 57.01574232843745
			}
		}
	}
}

The generator code, dashboard and sample websocket message are in the example.zip file.

Websocket Channels

Hi does the plugin support websocket channels? The usecase is to create a websocket server which receives data from multiple kafka consumers. I wanted to use websocket channels to streaming consumer data one topic per channel. However i was not able to define the websocket channel throw the plugin?
Im i missing something or the plugin is not compatible with websocket channels?
Any idea how to implement the scenario i briefly explained?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.