Skip to content

Latest commit

History

221 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Upbeat

Upbeat is a high performance node-based healthcheck/dashboard. Upbeat allows you to run health checks and provides a dashboard to chart the performance. It also allows you to proxy and cache these health checks so they don't tax your system. You can now reduces the number of health checks to a service from O(N) to O(1).

Installation

As executable

npm install -g upbeat

Run upbeat

upbeat config.yml

As library

npm install upbeat
varupbeat=require('upbeat');varserver=newupbeat.Server(configObject);server.run();

Configuration

Quickstart config:

dashboard:
port: 2468sync:
redis: port: 6379host: localhostservices:
google:
www:
strategy: httpurl: http://www.google.comconnection:
strategy: tcphost: google.comport: 80

Services

Services are a way of grouping several sensor checks together. In the example above, we have a "google" service w hich we check by making a get request to "http://www.google.com" and also seeing if we have a connection to port 8 0 on the "google.com" host. In the yaml config, a service is a "hash" of sensors where the keys are the names of the sensors and the values are the configuration.

Sensors

Sensors are a way of describing a health check. Each sensor config MUST at least have a strategy. Common configuration options accross all strategies are:

  • timeout: number (milliseconds) to define how long it will allow a check before declaring it a failure
  • interval: number (milliseconds) of time to wait between health checks (called after the result of a check)
  • fall: number of fails to be considered down
  • rise: number of passes to be considered up

Here are some examples of how you can use sensors and their strategies:

tcp

strategy: tcphost: google.comport: 80

http

strategy: httpurl: http://www.google.com

pidfile

strategy: pidfilepidfile: /var/pids/mysql.pid

redis

strategy: redishost: localhost # defaults to localhostport: 6379# defaults to 6379command: [ 'exists', 'foo' ]

mysql

strategy: mysqlhost: host # requireduser: user # requiredpassword: pass # requiredsql: "SELECT * FROM users LIMIT 1"# defaults to "SHOW TABLES"

About

Fast health and performance checking

Resources

Stars

49 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages