-
-
Save vagelim/0c4c294e5375b9dbafc2b3d5363a73fd to your computer and use it in GitHub Desktop.
Retrieve metadata about systems from Datadog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ensure you have `jq` installed - http://stedolan.github.io/jq/ | |
$ brew install jq | |
... | |
/usr/local/Cellar/jq/1.4: 15 files, 748K, built in 9 seconds | |
# Grab your API_KEY and create an APPLICATION_KEY from https://app.datadoghq.com/account/settings#api | |
$ export API_KEY=aaabbbccc | |
$ export APPLICATION_KEY=111222333 | |
$ curl -s "https://app.datadoghq.com/reports/v2/overview?with_meta=true&api_key=$DD_API&application_key=$DD_APP" \ | |
| jq -r '.rows[] | select(.meta.platform == "linux2") | |
| select(.meta.agent_version) | |
| [.name, .meta.agent_version] | @csv' | sort | |
"i-000000","5.13.0" | |
"i-0000","5.13.2" | |
"i-000","5.13.2" | |
"i-00","5.13.0" | |
"i-0","5.13.2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment