sensu-api
v0.0.1
Published
Api wrapper for Sensu api
Downloads
6
Readme
Sensu-API
This is a simple wrapper for the Sensu api.
Please visit http://sensuapp.org/docs/0.12/api for more information.
Usage:
var sensu = require('sensu-api')({
apiURL: 'http://sensu.hostname.com:4567/',
username: '',
password: ''
});
sensu.getChecks(function(data) {
console.log(data);
});
sensu.getChecks('cpu_metrics', function(data) {
console.log(data);
});
sensu.getClients({
name: 'hostname.com',
history: true
}, function(data) {
console.log(data);
});
sensu.getEvents({
client: 'hostname.com',
check: 'disk_check'
}, function(data) {
console.log(data);
});
sensu.getHealth({
consumers: 5,
messages: 2
}, function(data) {
console.log(data);
});
sensu.getInfo(function(data) {
console.log(data);
});
sensu.getStashes(function(data) {
console.log(data);
});