GitXplorerGitXplorer
m

node-mackerel

public
6 stars
4 forks
1 issues

Commits

List of commits on branch master.
Unverified
22f4ce5f98c0e54c6041e6a5c303ad33df13c263

update gitignore

mmuddydixon committed 3 years ago
Unverified
a6c446618e94ebd2514c57a190c2d7a64cb1d6bb

Merge branch 'master' of ssh://github.com/muddydixon/node-mackerel

mmuddydixon committed 3 years ago
Verified
64ec1774e8e630fa1bd65eef59f2753d853455af

Merge pull request #5 from sakamossan/use-body-instead-of-form

mmuddydixon committed 3 years ago
Unverified
7d46f089c5ce81477cff456a6cdeaa701760b499

update modules

mmuddydixon committed 3 years ago
Unverified
75a2dfcf4618f4414380e9dba2fcc8728917b65d

fixed to request Content-Type that mackerel server receive

ssakamossan committed 3 years ago
Verified
8fccfd60679224bb3bf7f5464a3aa5f00a51ece8

Merge pull request #3 from holidayworking/new-api-baseurl

mmuddydixon committed 7 years ago

README

The README file for this repository.

Mackerel node.js client Build Status

This module is node.js client for Mackerel.io

Install

$ npm install mackerel

Usage

Get Api Key by "Detail" page via dashboard

Mackerel = require "mackerel"
mackerel = new Mackerel("your api key")

# use Promise
mackerel.getHosts()
.then(({res, body})->
  console.log body.hosts # hosts info array
)

# or callback function
mackerel.getHosts((err, res, body)->
  console.log body.hosts # hosts info array
)

APIs

  • getHosts([callback])
  • addHost(data[, callback])
  • getHostInfo(id[, callback])
  • updateHostInfo(id, data[, callback])
  • changeHostStatus(id, status[, callback])
  • retireHost(id[, callback])
  • postMetric(data[, callback])
  • postServiceMetric(service, data[, callback])

See detail: mackerel api specification

TODOs

  • stream post metric

Author

@muddydixon muddydixon@gmail.com

License

Apache License Version 2.0

Contribute

git clone git@github.com:muddydixon/node-mackerel.git
cd node-mackerel
npm install
# and write code