npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

cabot-zombie

v0.1.4

Published

Automate your configuration of Cabot monitoring

Downloads

18

Readme

cabot-zombie

DEPRECATED

This is deprecated in favor of cabot-db-config, which is way faster and more reliable.


Automate your configuration of Cabot monitoring.

Cabot is a self-hosted monitoring and alert service. But unfortunately it lacks an HTTP API to automate configuration.

cabot-zombie runs a headless browser (Zombie.js) that creates your configuration based on a simple Javascript object.

Cabot let's you create multiple services, instances and checks. cabot-zombie currently supports a configuration that creates N services, each one running on N instances, and with N checks (only HTTP checks supported right now).

Install

npm i -S cabot-zombie

Configure

createServices.js

const cabotZombie = require('cabot-zombie')
const config = require('./config')

cabotZombie(config)
  .then(() => console.log('All done!'))

config.js

module.exports = {
  baseUrl: 'http://my-host-with-cabot:1234/',
  credentials: {
    username: 'docker', // cabot's default username when installed with docker
    password: 'docker', // cabot's default password when installed with docker
  },
  data: {
    services: [
      {
        name: 'service-a',
        instances: [
          {
            address: 'my-host-a', // will automatically create a default ping check to this host
            checks: [
              {
                type: 'http',
                endpoint: 'http://my-host-a/my-page',
                textMatch: 'my page should contain this',
                frequency: 1, # minute - default is 5 minutes
              },
            ],
          },
          {
            address: 'my-host-b',
            checks: [
              {
                type: 'http',
                endpoint: 'http://my-host-b/my-page',
                textMatch: 'my page should contain this',
              },
            ],
          },
        ],
      },
    ],
  },
}

Options

Second parameter to cabotZombie call is an object that can override some functions used in the process.

cabotZombie(config, {
  // customize service name. `data` contains data about the current service
  resolveServiceName: (data) => { ... },

  // customize service name. `data` contains data about the current service and instance
  resolveInstanceName: (data) => { ... },

  // customize service name. `data` contains data about the current service, instance and check
  resolveCheckName: (data) => { ... },

  // customize matching the check names to be added to a service. This is used when Zombie.js has to select the checks that are part of a service.
  customCheckNameMatcher: (checkName, data) => { ... },
})

For instance, I use these options like this:

const resolveServiceName = (data) => {
  const service = data.service
  return `${service.env}-${service.name}-service`
}

const resolveInstanceName = (data) => {
  return `${resolveServiceName(data)}-instance-${data.instanceIndex}`
}

const resolveCheckName = (data) => {
  return `${resolveInstanceName(data)}-check-${data.check.type}-${data.checkIndex}`
}

// use this to make the Zombie check the default ping check for each instance when checking all the checks for a service
const customCheckNameMatcher = (checkName, data) => {
  return checkName === `Default Ping Check for ${resolveInstanceName(data)}`
}

const options = {
  resolveServiceName,
  resolveInstanceName,
  resolveCheckName,
  customCheckNameMatcher,
}

const main = () => {
  cabotZombie(config, options)
    .then(() => console.log('All set up!'))
}

Contributing

cabot-zombie fits perfectly the configuration that I want to do, but it isn't very generic.

Any pull requests in that sense would be greatly appreciated.

License

MIT