Dashboard pushbutton to send MQTT or write to InfluxDB

Hello,
I’m looking for a way to have a button on the dashboard that writes data to InfluxDB. It could be approached a couple of ways:

  1. Grafana Dashboard button sends data to InfluxDB via HTTP API.
  2. Dashboard button that publishes to MQTT topic (my InfluxDB has a MqTT_consumer).

I couldn’t find any examples to help me get started. It seems the Grafana “Text” panel allows for javascript - so I was wondering if anyone has examples of javascript using either method? Or could guide me on which way to go? The example InfluxDB javascript I could find uses a library to interact with InfluxDB rather than form and send HTTP POST.

Thanks,
Eric

Your best bet is to write a custom panel and look at the InfluxDB docs for how to write data via their HTTP api. You will not be able to write data via the Grafana data source proxy as that proxy will not allow writes.

Did you solve this issue? I’m looking at the same solution…please advice.
Thanks a lot

-Smircio