diff --git a/index.html b/index.html index a6d8ae3..75a0a2a 100644 --- a/index.html +++ b/index.html @@ -18,6 +18,8 @@ document.addEventListener("DOMContentLoaded", function(){hljs.initHighlightingOn
take a snapshot of a metric query
the metric query to use for the snapshot
POSIX timestamp for the beginning of the query
POSIX timestamp for the end of the query
optional, an event query to overlay event bands on the snapshot
function(err, res)
var dogapi = require("dogapi"); +var options = { + api_key: "api_key", + app_key: "app_key" +}; +dogapi.initialize(options); +var query = "system.cpu.idle{*}"; +var to = dogapi.now(); +var from = from - 3600; // an hour ago +dogapi.graph.snapshot(query, from, to, function(err, res){ + console.dir(res); +}); +