Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

bosun-monitor/bosun

Folders and files

NameName
Last commit message
Last commit date
May 29, 2024
Oct 5, 2020
Mar 17, 2024
May 28, 2024
Jun 16, 2020
May 29, 2024
May 12, 2020
May 28, 2024
Feb 13, 2025
Oct 2, 2020
May 12, 2020
Dec 12, 2019
Oct 17, 2018
Dec 13, 2019
Oct 3, 2020
Feb 4, 2015
Jan 10, 2017
May 16, 2017
May 11, 2020
May 14, 2020
May 28, 2024
Mar 12, 2015
Nov 22, 2019
May 28, 2024
Dec 4, 2014
May 17, 2020
May 13, 2020
Jun 18, 2015
Aug 18, 2016
May 29, 2024
May 29, 2024
Jul 28, 2015
Feb 4, 2015
Apr 29, 2015
May 28, 2024
May 12, 2020

Repository files navigation

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.