diff --git a/index.html b/index.html index a7cdbb5..a7040d7 100644 --- a/index.html +++ b/index.html @@ -20,6 +20,8 @@ document.addEventListener("DOMContentLoaded", function(){hljs.initHighlightingOn
  • metric
  • +
  • serviceCheck +
  • tag
  • client @@ -296,6 +298,57 @@ is given "now" is used as the timestamp

    +
    +
    +

    serviceCheck

    + +
    +

    check(check, hostName, status, parameters, callback)

    +
    +

    post an update to a service check

    +

    Parameters:

    +
    +
    check
    +

    the check name (e.g. "app.ok")

    +
    +
    hostName
    +

    the name of the host submitting the check

    +
    +
    status
    +

    one of dogapi.OK, dogapi.WARNING, dogapi.CRITICAL or dogapi.UNKNOWN

    +
    +
    parameters
    +

    optional, an object containing any of the following

    +
      +
    • timestamp: POSIX timestamp for when the check happened
    • +
    • message: string message to accompany the check
    • +
    • tags: an array of "tag:value"'s associated with the check
    • +
    +
    +
    callback
    +

    function(err, res)

    +
    +
    +
    +
    +
     var dogapi = require("dogapi");
    + var options = {
    +   api_key: "api_key",
    +   app_key: "app_key"
    + };
    + dogapi.initialize(options);
    + var check = "app.ok";
    + var hostName = "some.machine";
    + dogapi.serviceCheck.check(
    +   check, hostName, dogapi.WARNING, function(err, res){
    +     console.dir(res);
    + });
    +
    +
    +
    +

    tag