JSON Example #34
Replies: 25 comments 42 replies
-
Hi,I am using the URL to fetch json data from REST API. |
Beta Was this translation helpful? Give feedback.
-
Hi, Is there something in this datasource that would stop the URL from working if the endpoint was on the same local network as my on premise Grafana server but was not resolvable to the public internet? I have a private webserver on the same private network as my Grafana server but when I try to use this Infinity json datasource with my endpoint all I get is a 500 error. I can access my endpoint via the browser without issue and have even gone so far as to copy the json result set exactly from your sample URL in my endpoint, but all I ever get is a 500 error. Any thoughts as to why my endpoint can't be resolved by this datasource? |
Beta Was this translation helpful? Give feedback.
-
Hello, I was hoping if you can create some examples for a scenario where your JSON has an array field and how would you read the data from those data fields. I have also opened a Discussion on the same topic. |
Beta Was this translation helpful? Give feedback.
-
Is it possible to create an alert via the infinity plugin? I am trying and receiving the below error. |
Beta Was this translation helpful? Give feedback.
-
Hey currently I am on trial and I want to access some data from my company fql database. I am able using to access data using a curl (POST) request but I am not able to get the data using post command in infinity dashboard and when i got into the detail i can see the headers I am setting their values are automatically becoming xxxxxxx. Is there any particular reason for that. Can't find any documentation regarding making POST queries in infinity dashboard. Please help at the earliest. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Is possible to compare two json files and store the results into a dashboard. |
Beta Was this translation helpful? Give feedback.
-
Hi @yesoreyeram would you be so kind as to point me to resources where I can learn UQL also any infinity plugin pivot table like examples would be greatly appreciated. Thanks |
Beta Was this translation helpful? Give feedback.
-
I am having great success in using Infinity for fetching single-series data from my custom Json data service. This is a very nice datasource! |
Beta Was this translation helpful? Give feedback.
-
Hello, I need help, I am using grafana 7.0.0 and infinity as datasource, I have an API which I want to show in tables, But problem here is API structure, the information I am trying to utilize is under data and than there is further blocks. how can I display the information in the casecading block of data? |
Beta Was this translation helpful? Give feedback.
-
Hi Hi Json sample feature-toggles: [
{
name: "cc-limit-user-bindings",
namespace: "feature-toggle",
creationTimestamp: "2023-07-02T05:32:06Z",
modefiedTimestamp: "2023-07-02T05:32:06Z",
enabled: false,
landscape: "staging",
componentName: "core-controllers",
createdBy: "Shachar Malachi",
version: 6,
strategy: {
name: "default"
}
},
{
name: "cim-publish-to-root-governance",
namespace: "feature-toggle",
creationTimestamp: "2023-07-02T05:32:06Z",
modefiedTimestamp: "2023-07-02T05:32:06Z",
enabled: true,
landscape: "staging",
componentName: "commercial-integration-manager",
createdBy: "Gilad Keinan",
version: 6,
strategy: {
name: "default"
}
},
{
name: "test-feature-toggle-lock",
namespace: "feature-toggle",
creationTimestamp: "2023-07-02T05:32:06Z",
modefiedTimestamp: "2023-07-02T05:32:06Z",
enabled: null,
landscape: "canary",
componentName: "some-test-ft-scenario",
createdBy: "Nati Gavriel",
version: 1,
strategy: {
name: "default"
}
},
{
name: "ua-restrict-initial-admins",
namespace: "feature-toggle",
creationTimestamp: "2023-07-02T05:32:06Z",
modefiedTimestamp: "2023-07-02T05:32:06Z",
enabled: true,
landscape: "canary",
componentName: "some-test-ft-scenario",
createdBy: "Aviv Guy",
version: 2,
strategy: {
name: "default"
}
}
]
|
Beta Was this translation helpful? Give feedback.
-
I came across an error where the grafana table-old panel displayed "Query data error". Trying to understand where lies the issue. |
Beta Was this translation helpful? Give feedback.
-
@yesoreyeram I need to trigger alert using infinity plugin, I am using parser as Backend, in my case I am querying from Elasticsearch index and it gives me the result when I use hits.hits in the "Rows/Root" field in create alert, but it is failing when I use "hits.hits._source" Actually requirement is like I need to access the "_source" property inside "hits.hits" of every document and add one more field dynamically and then query based on a filter condition for two properties of the _source object, can you please let me know how can I achieve this. Please consider below sample response from Elasticsearch:
|
Beta Was this translation helpful? Give feedback.
-
Can you use this method to retrieve the http status code instead of the data itself or it isnt posible |
Beta Was this translation helpful? Give feedback.
-
My API output is like the following {
"properties": {
"nextLink": null,
"columns": [
{
"name": "Cost",
"type": "Number"
},
{
"name": "UsageDate",
"type": "Number"
},
{
"name": "Currency",
"type": "String"
}
],
"rows": [
[232323, 20240101, "USD"],
[232323, 20240102, "USD"]
]
}
}
How do I separate the 3 values inside "rows"? |
Beta Was this translation helpful? Give feedback.
-
In my case the infinity plugin does not work when I request the data from a local server (localhost:1415). |
Beta Was this translation helpful? Give feedback.
-
{
"_class": "hudson.model.ComputerSet",
"busyExecutors": 11,
"computer": [
{
"_class": "hudson.model.Hudson$MasterComputer",
"actions": [
{
}
],
"assignedLabels": [
{
"name": "master"
}
],
"description": "the Jenkins controller's built-in node",
"displayName": "Built-In Node",
"executors": [
{
}
],
"icon": "symbol-computer",
"iconClassName": "symbol-computer",
"idle": false,
"jnlpAgent": false,
"launchSupported": true,
"loadStatistics": {
"_class": "hudson.model.Label$1"
},
"manualLaunchAllowed": true,
"monitorData": {
"hudson.node_monitors.SwapSpaceMonitor": {
"_class": "hudson.node_monitors.SwapSpaceMonitor$MemoryUsage2",
"availablePhysicalMemory": 89718784,
"availableSwapSpace": 8182034432,
"totalPhysicalMemory": 2171736064,
"totalSwapSpace": 8455712768
},
"hudson.node_monitors.TemporarySpaceMonitor": {
"_class": "hudson.node_monitors.DiskSpaceMonitorDescriptor$DiskSpace",
"timestamp": 1707968517427,
"path": "/tmp",
"size": 15627452416
},
"hudson.node_monitors.DiskSpaceMonitor": {
"_class": "hudson.node_monitors.DiskSpaceMonitorDescriptor$DiskSpace",
"timestamp": 1707968517302,
"path": "/var/lib/jenkins",
"size": 15627452416
},
"hudson.node_monitors.ArchitectureMonitor": "Linux (amd64)",
"hudson.node_monitors.ResponseTimeMonitor": {
"_class": "hudson.node_monitors.ResponseTimeMonitor$Data",
"timestamp": 1707968517313,
"average": 0
},
"hudson.node_monitors.ClockMonitor": {
"_class": "hudson.util.ClockDifference",
"diff": 0
}
},
"numExecutors": 1,
"offline": false,
"offlineCause": null,
"offlineCauseReason": "",
"oneOffExecutors": [
{
},
{
},
{
},
{
}
],
"temporarilyOffline": false
},
{
"_class": "hudson.slaves.SlaveComputer",
"actions": [
{
"_class": "hudson.plugins.jobConfigHistory.ComputerConfigHistoryAction"
},
{
},
{
}
],
"assignedLabels": [
{
"name": "aquarover"
},
{
"name": "linux84"
}
],
"description": "",
"displayName": "aquarover",
"executors": [
{
}
],
"icon": "symbol-computer-offline",
"iconClassName": "symbol-computer-offline",
"idle": true,
"jnlpAgent": true,
"launchSupported": false,
"loadStatistics": {
"_class": "hudson.model.Label$1"
},
"manualLaunchAllowed": true,
"monitorData": {
"hudson.node_monitors.SwapSpaceMonitor": null,
"hudson.node_monitors.TemporarySpaceMonitor": null,
"hudson.node_monitors.DiskSpaceMonitor": null,
"hudson.node_monitors.ArchitectureMonitor": null,
"hudson.node_monitors.ResponseTimeMonitor": null,
"hudson.node_monitors.ClockMonitor": null
},
"numExecutors": 1,
"offline": true,
"offlineCause": null,
"offlineCauseReason": "",
"oneOffExecutors": [
],
"temporarilyOffline": false,
"absoluteRemotePath": null
}
]
} Here is my json data. I want to access under computer , under monitoring data, availablePhysicalMemory. Can you please help me how can I acheive this |
Beta Was this translation helpful? Give feedback.
-
@yesoreyeram |
Beta Was this translation helpful? Give feedback.
-
Hi, i have a question that my Api request is dependent on two steps
|
Beta Was this translation helpful? Give feedback.
-
Hi, I have a question regarding variables. I've used inline JSON to set the following:
And within the dashboards, I've set a panel to show these as columns, depending on which site is selected. The query itself also uses an inline CSV format:
But that doesn't seem to change much. Is there something i'm missing or is this not possible? |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm unable to set the alerts even though I have choose the backend parser, Can anyone guide me in achieving this thing? I want to create alerts on JSON data called through API |
Beta Was this translation helpful? Give feedback.
-
I have a JSON I get from an HTTP endpoint without a timestamp, and I want to add an artificial timestamp as the local time I do this HTTP GET. Is that possible, and how? I was looking into the "Transform Data" but could not figure out. |
Beta Was this translation helpful? Give feedback.
-
How to use pagination in zero-based API's? Is there a workaround at this moment? |
Beta Was this translation helpful? Give feedback.
-
Hi @yesoreyeram , I am using the infinity plugin to fetch the milestone data from my gitlab instance on grafana. Example data frame: <style> </style>
I want to conditionally highlight the milestone which is nearing (say in a month's time) I have tried using the field override option, (to set threshold/colour mapping) but the rows aren't getting changed as per the expectation. How can i achieve this functionality and have good visualisation in dashboard. I am finding it hard to figure this out, could you please share your thoughts or point me to the resources that would help me to understand and solve this problem. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
@yesoreyeram Hey , i am trying to create an alert based on a health API in my service, I want to send an alert when my api response status is 5XX, but infinity plugin is throwing error when API fails, is there a way to catch the error and send out an alert. |
Beta Was this translation helpful? Give feedback.
-
JSON URL
Below example shows about fetching data from JSON URL.
URL : https://jsonplaceholder.typicode.com/users
In the above example, the data in the URL is array. So no need to configure any additional fields except url in the panel.
JSON URL - data in a json property
URL : https://thingspeak.com/channels/38629/feed.json
In the above example, data is in the
feeds
property. So the same is specified as root / rows field. But still our plugin doesn't know anything about the fields or it's types. So we are going to add the columns to make it more meaningful.We are adding columns and defining their types as shown below.
JSON Data without time field
URL : https://gist.githubusercontent.com/yesoreyeram/2433ce69862f452b9d0460c947ee191f/raw/f8200a62b68a096792578efd5e3c72fdc5d99d98/population.json
In the above example, we are visualising a json data without time field. Our JSON has only two fields aka
country
andpopulation
. 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
Beta Was this translation helpful? Give feedback.
All reactions