aboutsummaryrefslogtreecommitdiff
path: root/test/fixture
diff options
context:
space:
mode:
Diffstat (limited to 'test/fixture')
-rw-r--r--test/fixture/vcr_cassettes/metrics/metrics.json16
-rw-r--r--test/fixture/vcr_cassettes/metrics/post_series.json16
-rw-r--r--test/fixture/vcr_cassettes/metrics/query.json16
-rw-r--r--test/fixture/vcr_cassettes/monitors/details.json16
-rw-r--r--test/fixture/vcr_cassettes/monitors/details_with_group_states.json19
-rw-r--r--test/fixture/vcr_cassettes/search/faceted.json16
-rw-r--r--test/fixture/vcr_cassettes/search/unfaceted.json16
7 files changed, 115 insertions, 0 deletions
diff --git a/test/fixture/vcr_cassettes/metrics/metrics.json b/test/fixture/vcr_cassettes/metrics/metrics.json
new file mode 100644
index 0000000..f66d8f4
--- /dev/null
+++ b/test/fixture/vcr_cassettes/metrics/metrics.json
@@ -0,0 +1,16 @@
+[
+ {
+ "request": {
+ "body": "",
+ "method": "get",
+ "options": [],
+ "request_body": "",
+ "url": "https://app.datadoghq.com/api/v1/metrics?api_key=1234&application_key=abcd&from=1467815773"
+ },
+ "response": {
+ "body": "{\"metrics\":[\"system.load.1\",\"system.load.15\",\"system.load.5\",\"system.load.norm.1\",\"system.load.norm.15\",\"system.load.norm.5\",\"system.mem.buffered\",\"system.mem.cached\",\"system.mem.committed\",\"system.mem.free\"],\"from\":1467815773}",
+ "status_code": 200,
+ "type": "ok"
+ }
+ }
+]
diff --git a/test/fixture/vcr_cassettes/metrics/post_series.json b/test/fixture/vcr_cassettes/metrics/post_series.json
new file mode 100644
index 0000000..091e8f9
--- /dev/null
+++ b/test/fixture/vcr_cassettes/metrics/post_series.json
@@ -0,0 +1,16 @@
+[
+ {
+ "request": {
+ "body": "{\"series\":[{\"type\":\"gauge\",\"tags\":[\"environment:test\"],\"points\":[[14303118000000,20]],\"metric\":\"test.metric\",\"host\":\"test.example.com\"}]}",
+ "method": "post",
+ "options": [],
+ "request_body": "",
+ "url": "https://app.datadoghq.com/api/v1/series?api_key=1234"
+ },
+ "response": {
+ "body": "{\"status\":\"ok\"}",
+ "status_code": 202,
+ "type": "ok"
+ }
+ }
+]
diff --git a/test/fixture/vcr_cassettes/metrics/query.json b/test/fixture/vcr_cassettes/metrics/query.json
new file mode 100644
index 0000000..69639a7
--- /dev/null
+++ b/test/fixture/vcr_cassettes/metrics/query.json
@@ -0,0 +1,16 @@
+[
+ {
+ "request": {
+ "body": "",
+ "method": "get",
+ "options": [],
+ "request_body": "",
+ "url": "https://app.datadoghq.com/api/v1/query?api_key=1234&application_key=abcd&to=1430312999000from=1430226140000&query=system.cpu.idle{*}by{host}"
+ },
+ "response": {
+ "body": "{\"status\":\"ok\",\"res_type\":\"time_series\",\"series\":[{\"metric\":\"system.cpu.idle\",\"attributes\":{},\"display_name\":\"system.cpu.idle\",\"unit\":null,\"pointlist\":[[1430311800000,98.19375610351562],[1430312400000,99.85856628417969]],\"end\":1430312999000,\"interval\":600,\"start\":1430311800000,\"length\":2,\"aggr\":null,\"scope\":\"host:vagrant-ubuntu-trusty-64\",\"expression\":\"system.cpu.idle{host:vagrant-ubuntu-trusty-64}\"}],\"from_date\":1430226140000,\"group_by\":[\"host\"],\"to_date\":1430312540000,\"query\":\"system.cpu.idle{*}by{host}\",\"message\":\"\"}",
+ "status_code": 200,
+ "type": "ok"
+ }
+ }
+]
diff --git a/test/fixture/vcr_cassettes/monitors/details.json b/test/fixture/vcr_cassettes/monitors/details.json
new file mode 100644
index 0000000..cc77b1a
--- /dev/null
+++ b/test/fixture/vcr_cassettes/monitors/details.json
@@ -0,0 +1,16 @@
+[
+ {
+ "request": {
+ "body": "",
+ "method": "get",
+ "options": [],
+ "request_body": "",
+ "url": "https://app.datadoghq.com/api/v1/monitor/91879?api_key=1234&application_key=abcd"
+ },
+ "response": {
+ "body": "{\"id\":91879,\"message\":\"We may need to add web hosts if this is consistently high.\",\"name\":\"Bytes received on host0\",\"options\":{\"notify_audit\":false,\"notify_no_data\":false,\"silenced\":{}},\"org_id\":1499,\"query\":\"avg(last_1h):sum:system.net.bytes_rcvd{host:host0} > 100\",\"type\":\"metric alert\",\"multi\":false,\"created\":\"2015-12-18T16:34:14.014039+00:00\",\"modified\":\"2015-12-18T16:34:14.014039+00:00\"}",
+ "status_code": 200,
+ "type": "ok"
+ }
+ }
+]
diff --git a/test/fixture/vcr_cassettes/monitors/details_with_group_states.json b/test/fixture/vcr_cassettes/monitors/details_with_group_states.json
new file mode 100644
index 0000000..2de9ea9
--- /dev/null
+++ b/test/fixture/vcr_cassettes/monitors/details_with_group_states.json
@@ -0,0 +1,19 @@
+[
+ {
+ "request": {
+ "body": "\"\"",
+ "headers": {
+ "user-agent": "exdatadog"
+ },
+ "method": "get",
+ "options": [],
+ "request_body": "",
+ "url": "https://app.datadoghq.com/api/v1/monitor/91879?api_key=1234&application_key=abcd&group_states=alert%2Cwarn"
+ },
+ "response": {
+ "body": "{\"id\":91879,\"message\":\"We may need to add web hosts if this is consistently high.\",\"name\":\"Bytes received on host0\",\"options\":{\"no_data_timeframe\":20,\"notify_audit\":false,\"notify_no_data\":false,\"silenced\":{}},\"org_id\":1499,\"query\":\"avg(last_1h):sum:system.net.bytes_rcvd{host:host0} > 100\",\"type\":\"metric alert\",\"multi\":false,\"created\":\"2015-12-18T16:34:14.014039+00:00\",\"modified\":\"2015-12-18T16:34:14.014039+00:00\",\"state\":{\"groups\":{\"host:host0\":{\"last_nodata_ts\":null,\"last_notified_ts\":1481909160,\"last_resolved_ts\":1481908200,\"last_triggered_ts\":1481909160,\"name\":\"host:host0\",\"status\":\"Alert\",\"triggering_value\":{\"from_ts\":1481909037,\"to_ts\":1481909097,\"value\":1000}}}}}",
+ "status_code": 200,
+ "type": "ok"
+ }
+ }
+]
diff --git a/test/fixture/vcr_cassettes/search/faceted.json b/test/fixture/vcr_cassettes/search/faceted.json
new file mode 100644
index 0000000..3e74aaa
--- /dev/null
+++ b/test/fixture/vcr_cassettes/search/faceted.json
@@ -0,0 +1,16 @@
+[
+ {
+ "request": {
+ "body": "",
+ "method": "get",
+ "options": [],
+ "request_body": "",
+ "url": "https://app.datadoghq.com/api/v1/search?api_key=1234&application_key=abcd&q=test"
+ },
+ "response": {
+ "body": "{\"results\":{\"hosts\":[\"test.another.example.com\",\"test.example.com\",\"test.host\",\"test.metric.host\",\"test.tag.host\"]}}",
+ "status_code": 200,
+ "type": "ok"
+ }
+ }
+]
diff --git a/test/fixture/vcr_cassettes/search/unfaceted.json b/test/fixture/vcr_cassettes/search/unfaceted.json
new file mode 100644
index 0000000..efcadf7
--- /dev/null
+++ b/test/fixture/vcr_cassettes/search/unfaceted.json
@@ -0,0 +1,16 @@
+[
+ {
+ "request": {
+ "body": "",
+ "method": "get",
+ "options": [],
+ "request_body": "",
+ "url": "https://app.datadoghq.com/api/v1/search?api_key=1234&application_key=abcd&q=test"
+ },
+ "response": {
+ "body": "{\"results\":{\"hosts\":[\"test.another.example.com\",\"test.example.com\",\"test.host\",\"test.metric.host\",\"test.tag.host\"],\"metrics\":[\"test.metric\"]}}",
+ "status_code": 200,
+ "type": "ok"
+ }
+ }
+]