diff --git a/index.html b/index.html index c7bdd33..2b0a6a5 100644 --- a/index.html +++ b/index.html @@ -36,6 +36,8 @@ document.addEventListener("DOMContentLoaded", function(){hljs.initHighlightingOn
the body of the event
an optional object continaing any of the following additional optional properties
+an optional object continaing any of the following additional optional properties
add a new timeboard
+the title of the timeboard
+the description of the timeboard
+an array of objects with the following keys
+{"requests": [{"q": "system.cpu.idle{*} by {host}"}optional, an array of objects with the following keys
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+var title = "Time Keeps on Slipping";
+var description = "Into the Future";
+var graphs = [
+ {
+ definition: {
+ events: [],
+ requests: [
+ {q: "avg:system.mem.free{*}"}
+ ],
+ viz: "timeseries"
+ },
+ title: "Average Memory Free"
+ }
+];
+var templateVariables = [
+ {
+ name: "host1",
+ prefix: "host",
+ default: "host:my-host"
+ }
+];
+dogapi.timeboard.create(
+ title, description, graphs, templateVariables,
+ function(err, res){
+ console.dir(res);
+ }
+);
+
+update an existing timeboard
+the id of the timeboard to update
+the title of the timeboard
+the description of the timeboard
+an array of objects with the following keys
+{"requests": [{"q": "system.cpu.idle{*} by {host}"}optional, an array of objects with the following keys
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+var title = "Time Keeps on Slipping";
+var description = "Into the Future";
+var graphs = [
+ {
+ definition: {
+ events: [],
+ requests: [
+ {q: "avg:system.mem.free{*}"}
+ ],
+ viz: "timeseries"
+ },
+ title: "Average Memory Free"
+ }
+];
+var templateVariables = [
+ {
+ name: "host1",
+ prefix: "host",
+ default: "host:my-host"
+ }
+];
+dogapi.timeboard.update(
+ 1234, title, description, graphs, templateVariables,
+ function(err, res){
+ console.dir(res);
+ }
+);
+
+remove an existing timeboard
+the id of the timeboard to remove
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+dogapi.timeboard.remove(1234, function(err, res){
+ console.dir(res);
+});
+
+get all existing timeboards
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+dogapi.timeboard.getAll(1234, function(err, res){
+ console.dir(res);
+});
+
+get an existing timeboard
+the id of the timeboard to get
+function(err, res)
+var dogapi = require("dogapi");
+var options = {
+ api_key: "api_key",
+ app_key: "app_key"
+};
+dogapi.initialize(options);
+dogapi.timeboard.get(1234, function(err, res){
+ console.dir(res);
+});
+
+