'grafana display a text/string value from an API
How do you display a text/string value in Grafana with the data fetched from the JSON API plugin?
My datasource the url is https://bensapi.pythonanywhere.com/ that returns:
{"message":"Hello from Flask!","status":"success"}
Setting up the data source for this URL and EXPLORE option it works, the string on the bottom is what I am looking to display:
In grafana selecting this type of chart:
And trying to recreate my steps from the EXPLORE process of the data source I cant seem to plot the Hello from Flask string on a dashboard. Any tips appreciated.
Solution 1:[1]
While Jan's answer is correct for the graph and time series panel, you stated that you are using the stat panel.
There you can set what type of values are shown: In the panel settings go to Value options -> Fields. There the default is Numeric Fields. So when you haven't changed that, it is the reason 'No data' is shown for your string. Set it to All Fields to make the panel show strings.
Solution 2:[2]
So what I ended up using with the JSON API is the TABLE panel to display text values from a JSON API PAYLOAD. Looks like this below, the API JSON PATH to represent the data into columns:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | dreamcrash |
| Solution 2 | Jan Garaj |




