Closed jtommi closed 4 years ago
Hello there, a similar problem was mentioned in #4 and the origin was a problem with the CORS configuration.
If that doesn't help, can you please post a screenshot of the issue + the settings you're using?
I'm sorry, there were 8 total issues on this project and I missed the one that exactly described my issue. Obviously, I follow the instructions and it works fine.
It might be an idea to modify the panel settings to prevent this. Have a "source" setting where you can choose between Telegraf and Custom. If you choose custom, the CORS option disappears, etc. I'm currently learning Javascript, so I might actually look into how that can be done. Another idea I have in mind is a "keep-alive" option: since the plugin can't send the end request when the browser window is closed, it could send a keep alive to the server every x minutes. The server could than be configured to consider a session ended if it didn't receive a keep-alive for more than x+1 minutes (or more) which could still be overwritten if the end request comes in.
I threw together a quick listener using nodejs, but when activating "Post end", I get an error saying it couldn't parse the response and I don't understand why.
As you see, the payload looks good in Firefox and the Content type is JSON
Here is the NodeJS snippet:
I'm using a fresh docker image of Grafana 7.1.5