Browse Source

build docs

pull/14/head
Brett Langdon 11 years ago
parent
commit
dfdf498da8
1 changed files with 53 additions and 0 deletions
  1. +53
    -0
      index.html

+ 53
- 0
index.html View File

@ -20,6 +20,8 @@ document.addEventListener("DOMContentLoaded", function(){hljs.initHighlightingOn
</li> </li>
<li role=""><a href="#metric">metric</a> <li role=""><a href="#metric">metric</a>
</li> </li>
<li role=""><a href="#serviceCheck">serviceCheck</a>
</li>
<li role=""><a href="#tag">tag</a> <li role=""><a href="#tag">tag</a>
</li> </li>
<li role=""><a href="#client">client</a> <li role=""><a href="#client">client</a>
@ -296,6 +298,57 @@ is given &quot;now&quot; is used as the timestamp</p>
</div> </div>
</div> </div>
</section> </section>
<section id="serviceCheck" class="col-sm-12">
<div class="row">
<h2 class="bg-primary" style="text-indent:1rem">serviceCheck</h2></div>
<ul class="nav nav-pills">
<li role"presentation"><a href="#serviceCheck-check">check</a></li>
</ul>
<div class="function row" id="serviceCheck-check">
<h3 class="bg-info" style="text-indent:.5rem;padding:.5rem;margin-top:.5rem">check(check, hostName, status, parameters, callback)</h3>
<div class="col-md-6">
<p>post an update to a service check</p>
<h4>Parameters:</h4>
<dl>
<dt>check</dt>
<dd><p>the check name (e.g. &quot;app.ok&quot;)</p>
</dd>
<dt>hostName</dt>
<dd><p>the name of the host submitting the check</p>
</dd>
<dt>status</dt>
<dd><p>one of <code>dogapi.OK</code>, <code>dogapi.WARNING</code>, <code>dogapi.CRITICAL</code> or <code>dogapi.UNKNOWN</code></p>
</dd>
<dt>parameters</dt>
<dd><p><em>optional</em>, an object containing any of the following</p>
<ul>
<li>timestamp: POSIX timestamp for when the check happened</li>
<li>message: string message to accompany the check</li>
<li>tags: an array of &quot;tag:value&quot;&#39;s associated with the check</li>
</ul>
</dd>
<dt>callback</dt>
<dd><p>function(err, res)</p>
</dd>
</dl>
</div>
<div class="col-md-6">
<pre><code class="lang-javascript"> var dogapi = require(&quot;dogapi&quot;);
var options = {
api_key: &quot;api_key&quot;,
app_key: &quot;app_key&quot;
};
dogapi.initialize(options);
var check = &quot;app.ok&quot;;
var hostName = &quot;some.machine&quot;;
dogapi.serviceCheck.check(
check, hostName, dogapi.WARNING, function(err, res){
console.dir(res);
});
</code></pre>
</div>
</div>
</section>
<section id="tag" class="col-sm-12"> <section id="tag" class="col-sm-12">
<div class="row"> <div class="row">
<h2 class="bg-primary" style="text-indent:1rem">tag</h2></div> <h2 class="bg-primary" style="text-indent:1rem">tag</h2></div>


Loading…
Cancel
Save