- JSON, CSV, XML, GraphQL & HTML Datasources
- Data from external url / Inline data
- Support for Authenticated URLs
- Utility variables
- Mathmatical series Generation
You can visualize JSON from any URL. Any valid JSON returning array of objects at root level or at any of the node can be used as the datasource. More information about using JSON datasource is available in the github discussion.
If your JSON doesn't have any time column and only have point-in-time metric values, still you can use your json to pretend like timeseries. Refer the above github discussion for more details.
In the below example, we are visualising a json data without time field. Our JSON has only two fields aka country
and population
. So we asked the plugin to add a dummy time field to the data so that we can visualize them in any of the grafana's stock panel. If you closely look at the image above, you can see we specified 'format' as timeseries.
For reference, JSON data from the URL is given below
[
{ "country": "india", "population": 300 },
{ "country": "usa", "population": 200 },
{ "country": "uk", "population": 150 },
{ "country": "china", "population": 400 }
]
Same as JSON, you can visualize any csv URL using the datasource. CSVs are expected to have headers. You can visualize CSV just using the url and wihtout any additional configuration. By default all the CSV fields will be considered as text fields. If you specify individual fields and types, only the specific fields will be displayed. More information about using CSV datasource is available in the github discussion.
You can visualize any XML data using the infinity data source with few simple steps. Frst you need to specify url of the xml, then specify the root/rows value and then finally columns.
If your rows are directly under the root node, you can specify the rows as shown below. In my example I want to list all the CDs in the CATALOG. So my root node is CATALOG.CD
. Then for columns, I can specify each column and its type as shown below
You can also visualise complex XML structures explained in this github discussion
Grafana Infinity datasource is licensed under the Apache 2.0 License.