Open mafux777 opened 2 years ago
I'm not sure I understood. But you should have the plugin installed on Grafana, I can be used both on a local instance or on the cloud version. Then you should create a data source targeting your ws endpoint and use it on a dashboard/widget to grab the data and display as you need.
Your question made me think that you was trying to use it as a package for you application, and it's not made for that. It's a plugin for data visualization that works only with Grafana.
@chireia I think you misunderstood the question. I too want to send data to a websocket in order to subscribe to a subset of events.
Does the plugin offer an equivalent of ws.send()
? And if yes, how to do it?
also interested, @TinJoy59 did you figure it out?
Sorry @TinJoy59 and @adam1231231 , I don't think I understood it yet. Would you mind providing me more information or even screenshots of what you're trying to accomplish?
But answering your question:
Does the plugin offer an equivalent of ws.send()?
A: No, it's just a listener for WS messages.
Though, that might be a good new feature for the plugin, would you be interest in this addition? Is there another way to do it using some other plug-in/built-in Grafana?
@chireia so some websockets require a subscription message where you send a json or something like {SUBSCRIBE : "user 1234"} or something, I think the majority of websockets require a subscription messages so this plug-in is missing "send a message on connection " kind of feature, I'm using prometheus now anyway but thought this little add on for this product would be nice
Hi @adam1231231, did you end up using Prometheus as a substitute for this plugin when needing subscriptions for websockets? Thanks
This is pretty basic functionality and should have been one of the first things implemented imo.
Hi, is above issue fixed? this is mandatory to add initial subscription messages.
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?