You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

cabot-db-config

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cabot-db-config

Automate your configuration of Cabot monitoring.

0.1.3
latest
npm
Version published
Weekly downloads
3
200%
Maintainers
1
Weekly downloads
 
Created
Source

cabot-db-config

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-db-config uses a Javascript object to insert your configuration directly on your Cabot database.

Cabot let's you create multiple services, instances and checks. cabot-db-config currently supports a configuration that creates N services, each one running on N instances, and with N checks. A default ping check is created for every newly created instance.

cabot-db-config is the spiritual sequel to cabot-zombie. It is way faster and more reliable.

Install

npm i -S cabot-db-config

Configure

createServices.js

const cabotDbConfig = require('cabot-db-config')
const config = require('./config')

cabotDbConfig(config)

config.js

module.exports = {
  connectionString: 'postgres://docker:docker@my-host:1234/docker',
  data: {
    services: [
      {
        name: 'my-service',
        instances: [
          {
            address: 'my-host',
            checks: [
              {
                type: 'http',
                endpoint: 'http://my-host/index.html',
                text_match: 'Should contain this text',
              },
            ],
          },
          {
            address: 'my-other-host',
            ...
          },
        ],
      },
      {
        name: 'my-other-service',
        instances: [
          ...
        ],
      },
    ],
  },
}

Contributing

cabot-db-config 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

FAQs

Package last updated on 23 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts