AWS Cost Explorer example #505
Replies: 1 comment 1 reply
-
I'm trying to run this query as shown, but receive "error getting data frame. 400 Bad Request". I've made the same API call successfully in Postman, so I'm not sure what the problem is. Here's the query JSON:
I should also mention that I can successfully implement the Any idea what I'm doing wrong here? |
Beta Was this translation helpful? Give feedback.
-
The following example shows how to get the AWS Cost details in Grafana using Infinity Datasource
For initial setup of the datasource, follow the same instructions given in #501 except couple of changes as we are going to use
https://ce.us-east-1.amazonaws.com
for the cost explorer queriesce
us-east-1
https://ce.us-east-1.amazonaws.com
Config Editor
Query Editor
For example, we are going to use AWS GetCostAndUsage API.
The main thing we notice is the headers specified in the query. We have added
X-Amz-Target AWSInsightsIndexService.GetCostAndUsage
andContent-Type application/x-amz-json-1.1
headers to ensure that the entire flow is working as expected.We are also going to use POST method with some payload as described in the API document. For adding payload/headers, click the OPTIONS next to the URL.
Actual Query JSON is given below for reference
body content
raw response without root selector and fields
Beta Was this translation helpful? Give feedback.
All reactions