bosun.org

module
v0.0.0-...-9c5c369 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2024 License: MIT

README

Bosun

Bosun is a time series alerting framework developed by Stack Exchange. Scollector is a metric collection agent. Learn more at bosun.org.

Build Status

Building

bosun and scollector are found under the cmd directory. Run go build in the corresponding directories to build each project. There's also a Makefile available for most tasks.

Running

For a full stack with all dependencies, run docker-compose up from the docker directory. Don't forget to rebuild images and containers if you change the code:

$ cd docker
$ docker-compose down
$ docker-compose up --build

If you only need the dependencies (Redis, OpenTSDB, HBase) and would like to run Bosun on your machine directly (e.g. to attach a debugger), you can bring up the dependencies with these three commands from the repository's root:

$ docker run -p 6379:6379 --name redis redis:6
$ docker build -f docker/opentsdb.Dockerfile -t opentsdb .
$ docker run -p 4242:4242 --name opentsdb opentsdb

The OpenTSDB container will be reachable at http://localhost:4242. Redis listens on its default port 6379. Bosun, if brought up in a Docker container, is available at http://localhost:8070.

Developing

Install:

  • Run make deps and make testdeps to set up all dependencies.
  • Run make generate when new static assets (like JS and CSS files) are added or changed.

The w.sh script will automatically build and run bosun in a loop. It will update itself when go/js/ts files change, and it runs in read-only mode, not sending any alerts.

$ cd cmd/bosun
$ ./w.sh

Go Version:

  • See the version number in .travis.yml in the root of this repo for the version of Go to use. Generally speaking, you should be able to use newer versions of Go if you are able to build Bosun without error.

Miniprofiler:

  • Bosun includes miniprofiler in the web UI which can help with debugging. The key combination ALT-P will show miniprofiler. This allows you to see timings, as well as the raw queries sent to TSDBs.

Directories

Path Synopsis
Package version holds some version data common to bosun and scollector.
Package version holds some version data common to bosun and scollector.
web
Simple script to build bosun and scollector.
Simple script to build bosun and scollector.
Package cloudwatch defines structures for interacting with Cloudwatch Metrics.
Package cloudwatch defines structures for interacting with Cloudwatch Metrics.
cmd
backfill
Backfill denormalizes historic OpenTSDB data.
Backfill denormalizes historic OpenTSDB data.
bosun/conf/rule/parse
Package parse builds parse trees for configurations as defined by conf.
Package parse builds parse trees for configurations as defined by conf.
bosun/conf/template
Package template is a thin wrapper over go's text/template and html/template packages.
Package template is a thin wrapper over go's text/template and html/template packages.
bosun/database
Package database implements all persistent data access for bosun.
Package database implements all persistent data access for bosun.
bosun/expr/parse
Package parse builds parse trees for expressions as defined by expr.
Package parse builds parse trees for expressions as defined by expr.
bosun/sched/slack
Package slack is for creating slack notifications inside of Bosun templates
Package slack is for creating slack notifications inside of Bosun templates
scollector
Scollector is a metric collection agent for OpenTSDB 2.0 and Bosun.
Scollector is a metric collection agent for OpenTSDB 2.0 and Bosun.
scollector/conf
Package conf contains all of the configuration structs for scollector.
Package conf contains all of the configuration structs for scollector.
tsdbrelay
tsdbrelay relays OpenTSDB traffic to TSD and Bosun servers.
tsdbrelay relays OpenTSDB traffic to TSD and Bosun servers.
tsdbrelay/integrationTest
We are going to simulate a full multi-datacenter cluster: DC1:
We are going to simulate a full multi-datacenter cluster: DC1:
Package collect provides functions for sending data to OpenTSDB.
Package collect provides functions for sending data to OpenTSDB.
Package graphite defines structures for interacting with a Graphite server.
Package graphite defines structures for interacting with a Graphite server.
Package host contains functionality for dealing with the machine which Bosun is running on.
Package host contains functionality for dealing with the machine which Bosun is running on.
Package metadata provides metadata information between bosun and OpenTSDB.
Package metadata provides metadata information between bosun and OpenTSDB.
Package 'name' contains contracts and functionality to help with naming things.
Package 'name' contains contracts and functionality to help with naming things.
Package opentsdb defines structures for interacting with an OpenTSDB server.
Package opentsdb defines structures for interacting with an OpenTSDB server.
Package slog provides a cross-platform logging interface.
Package slog provides a cross-platform logging interface.
Package snmp provides an implementation of the SNMP specification.
Package snmp provides an implementation of the SNMP specification.
asn1
Package asn1 implements parsing of DER-encoded ASN.1 data structures, as defined in ITU-T Rec X.690.
Package asn1 implements parsing of DER-encoded ASN.1 data structures, as defined in ITU-T Rec X.690.
mib
Package mib parses modules of the virtual management information store.
Package mib parses modules of the virtual management information store.
Package util defines utilities for bosun.
Package util defines utilities for bosun.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL