Comments (11)
Hey Marcus,
sorry ill try to explain better.
I'm not sure if its something possible to implement on grafana. :)
this is my scenario, I have 4 servers with JSON api, exposed on the following addresses:
http://server1/api
http://server2/api
http://server3/api
http://server4/api
then i have a Grafana variable with these4 servers as drop down list.
when you select one of these servers, each one is bounded to its own data source. i had to put their data source as a variable, and create 4 different data sources.
its not so much a big issue, but if you have 10 servers, then you need to add 10 data sources...
my question is, is it possible to create 1 generic JSON data source, and then (as same as you passed the custom URL parameters from the query) pass the URL as a variable to the generic data source?
so this way I have only 1 data source, with a dynamic URL.
for now, my workaround was to create a php file as router, and redirect to the selected server.
something like:
http://mainserver?server=server1
then inside the php i redirect the request to:
http://server1/api
this way I only have 1 data source.
Thanks!!
from grafana-json-datasource.
I have the same issue I would like to send a Variable to the JSON call but it seems we are not capable of interacting with the call withing the dashboard.
from grafana-json-datasource.
Thanks both of you for the feature request! I think makes perfect sense to add something like this to the query editor. Would be pretty easy to implement as well.
from grafana-json-datasource.
This feature may be very useful !
from grafana-json-datasource.
I've published v0.6.0 with this feature. Let me know if it works for you!
from grafana-json-datasource.
Hey !
Thank you for the plugin. Can we use dashboard global variable in "Custom query parameters" ?
Thanks
from grafana-json-datasource.
Thanks Marcus! will check it up!
do you also plan to add passing the URL from the query to the data source?
from grafana-json-datasource.
from grafana-json-datasource.
No issue with last versions to use variable in custom query !
from grafana-json-datasource.
Thanks Marcus! will check it up!
do you also plan to add passing the URL from the query to the data source?
I'm afraid I don't understand what you mean by this. Could you give an example?
from grafana-json-datasource.
I don't think I've seen this pattern before, but there's nothing stopping us from adding a variable to the URL in the data source configuration and interpolating it for each query. Could you open a new issue for this maybe?
from grafana-json-datasource.
Related Issues (20)
- Grafana API does not export panel annotations HOT 1
- Cannot see JSONAPI datasource in the plugin list HOT 1
- Chore: migrate to create plugin
- Suporte a paginação HOT 1
- Support multi-value variables HOT 1
- Dynamically adding fields for all JSON properties HOT 1
- Issue with multiple API calls from same chart HOT 1
- Grafana v9 - Button HOT 2
- README Shows Example that doesn't work at all [?(@.data > 'otherdata']
- Filtering in Jsonpath using Grafana multi-value variable? 'IN' operator supported? Or workarounds? HOT 1
- Audit and fix A11Y issues HOT 1
- Can't perform basic math with JSONata HOT 1
- Query error e.ArrayVector is not a constructor Getting this error after the new update. HOT 2
- Query error e.ArrayVector is not a constructor Getting this error after the new update HOT 3
- Support Sigv4 Auth
- A variable can't take another variable's value as a http request parameter if it starts with "1"
- Hope to support returning key value pairs as variables
- Show more details in console or query inspector
- TimeShift not working HOT 1
- JSON API: Bad Gateway HOT 1
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-json-datasource.