VMware Modern Apps Community
corey_r
Community Manager
Community Manager

Chart API

I'm having difficulty retrieving data using the Chart API.  I can see results from the GUI, but when I run the cURL command I’m not retrieving values. Not sure if it's an issue with cURL command syntax, or something different.  Note: I've retrieved this data before, so I'm certain it exists.

curl -G "https://<domain>/chart/api?s=1451606400&e=1456790400&g=h&i=false&includeObsoleteMetrics=true&strict=true" -H 'X-AUTH-TOKEN: <token>' --data-urlencode 'q=align(1w,max,100-ts("cpu.cpuidle"))' | python ~/wavefront/scripts/wavefront_to_csv.py > ~/20160101_20160301.txt

Any thoughts or suggestions are much appreciated.

0 Kudos
4 Replies
corey_r
Community Manager
Community Manager

Hi Peter,

Did you have a chance to try to use the streaming API for your query? Please give it a try let me know if it works.

0 Kudos
corey_r
Community Manager
Community Manager

vasily@wavefront.com script seems to run.  Thank you!

I'm curious if you have suggestions on how best to manipulate the script to accommodate a variety of queries.  Any thoughts are much appreciated.

Peter

0 Kudos
corey_r
Community Manager
Community Manager

vasily@wavefront.com, I'm also unable to see data points on a Wavefront dashboard for the below query for a portion of February 2015.  I ran this query a few months ago and I have data, so I'm wondering why I don't see data now.

align(1w,mean,100-ts("cpu.cpuidle"))

Peter

0 Kudos
corey_r
Community Manager
Community Manager

Hi Peter,

Since what we are dealing with here is considered "historic data", could you please verify if the "Include obsolete metrics" checkbox is selected and run the query again? Please let me know if it helps!

-Vasily

0 Kudos