Comments (10)
Hi, here an example with postgres:
#1 (comment)
Which datasource are you using?
from grafana-button-panel.
I am using InfluxDB. I don't understand how the other person in that closed issue was able to get grafana to run scripts with this plugin.
from grafana-button-panel.
Here is an example to create a database with InfluxDB:
{
"query": "create database \"foo\"",
"rawQuery": true,
"resultFormat": "time_series"
}
And to delete it:
{
"query": "drop database \"foo\"",
"rawQuery": true,
"resultFormat": "time_series"
}
from grafana-button-panel.
Good afternoon,
Could you be so kind and make an example of a query with inserting some value to an InfluxDB measurement?
Regards
from grafana-button-panel.
Hi,
InfluxDB has three endpoints: /api/v2/query
, /api/v2/write
and /health
, and Grafana always uses query
. AFAIK the only way to use the write
endpoint is with a custom datasource.
from grafana-button-panel.
Hi,
InfluxDB has three endpoints:/api/v2/query
,/api/v2/write
and/health
, and Grafana always usesquery
. AFAIK the only way to use thewrite
endpoint is with a custom datasource.
Hi, how should we add queries to insert values into the influxdb database?
from grafana-button-panel.
Hi, you can only insert values with the endpoint /api/v2/write
. Grafana's InfluxDB Datasource only supports /api/v2/query
, so you can't unless you use a custom datasource implementing the write endpoint (see https://grafana.com/tutorials/build-a-data-source-plugin/).
from grafana-button-panel.
Hello, I am on grafana version 6.7.3, I am trying to add speakyourcode-button-panel but I have an error "Error loading panel plugin: speakyourcode-button-panel TypeError: v.setPanelOptions is not a function"
Do you have an idea ?
from grafana-button-panel.
The plugin requires Grafana 7 or higher, can you upgrade and try again?
from grafana-button-panel.
Hello, @speakyourcode
Is it possible to delete series of data from InfluxDB using your plugin?
My query is:
{
"query": "drop series from \"jmeter\" where \"application\" = \"$test_name\"",
"rawQuery": true,
"resultFormat": "time_series"
}
$test_name - grafana variable
After clicking on the button I received:
Button: 500 (Internal Server Error) An error occurred within the plugin
Using your example I was able to create a database.
Updates: my bad I've missed space after where clause: where"application". (already edited in this comment)
After that 500 error disappeared, but the query itself couldn't drop the series from DB. (in the dev tools I'm observing 200 OK)
Do you have any suggestions on how it can be done using your plugin?
Thanks.
from grafana-button-panel.
Related Issues (20)
- Button not working with Postgres Datasource HOT 3
- Error: Mixed Content when grafana behind HTTPS and server behind HTTP
- Does not works with grafana cloud, bad query endpoint HOT 3
- Plugin does not work in newer Version than v8.5.0 due to API change HOT 8
- Is it possible to send requests to InfluxDB 2? HOT 4
- Add possibility to show REST call result HOT 13
- Implementing Mysql HOT 1
- "Cosmetic" Feature request: change color of the buttons to custom colors and add an icon to the button HOT 1
- I have a mysql table. How to insert the data inside it? HOT 1
- How to call the stored Procedure? HOT 1
- drop measurement did not work HOT 1
- [Feature Request] Add the option to refresh the dashboard after a button has been clicked
- Custom Response text
- two SQL queries in one click MySQL
- specify database in the query HOT 6
- hello, i also want to use a template variable MYSQL database in the query. could you please tell me how to use it. many thanks~ HOT 7
- "Plugin not registered" error with Grafana 8.0.2. HOT 1
- Can I embed button into grafana table panel? HOT 1
- When edit any properties, all buttons collapse HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana-button-panel.