diff --git a/index.html b/index.html index 1846c11..6b23cbe 100644 --- a/index.html +++ b/index.html @@ -486,7 +486,7 @@ var options = { dogapi.initialize(options); var query = "system.cpu.idle{*}"; var to = dogapi.now(); -var from = from - 3600; // an hour ago +var from = to - 3600; // an hour ago dogapi.graph.snapshot(query, from, to, function(err, res){ console.dir(res); }); @@ -1772,15 +1772,28 @@ with the datadog api. The available options are.
v1]api.datadoghq.com]var dogapi = require("dogapi");
+
+// Optional for Proxy -------8<----------
+// Code from http://blog.vanamco.com/proxy-requests-in-node-js/
+var HttpsProxyAgent = require("./httpsproxyagent");
+
+var agent = new HttpsProxyAgent({
+ proxyHost: "MY_PROXY_HOST",
+ proxyPort: 3128
+});
+// Optional for Proxy -------->8----------
+
var options = {
api_key: "<API_KEY_HERE>",
- app_key: "<APP_KEY_HERE>"
+ app_key: "<APP_KEY_HERE>",
+ proxy_agent: agent // Optional for Proxy
};
dogapi.initialize(options);
dogapi.event.create(...);