export DD_API_KEY="xxxxxxx" export DD_APP_KEY="xxxxxxx"
参考:https://docs.datadoghq.com/ja/api/latest/monitors/#get-all-monitors
curl -X GET "https://api.datadoghq.com/api/v1/monitor" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
参考:https://docs.datadoghq.com/ja/api/latest/downtimes/#get-all-downtimes
curl -X GET "https://api.datadoghq.com/api/v2/downtime" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
jq -c < sample.json
cat sample1.json | jq -r '.[] | [.key1, .key2, .key3] | @csv'
$ cat corona.json |jq -r '.data[]|[.country, .cases, .todayCases, .deaths, .todayDeaths, .recovered, .active, .critical, .casesPerOneMillion, .deathsPerOneMillion, .tests, .testsPerOneMillion, .confirmed, .countryCode]|@csv'