bosun.org@v0.0.0-20210513094433-e25bc3e69a1f/README.md (about)

     1  # Bosun
     2  
     3  Bosun is a time series alerting framework developed by Stack Exchange. Scollector is a metric collection agent. Learn more at [bosun.org](http://bosun.org).
     4  
     5  [![Build Status](https://travis-ci.org/bosun-monitor/bosun.svg?branch=master)](https://travis-ci.org/bosun-monitor/bosun/branches)
     6  
     7  ## Building
     8  
     9  bosun and scollector are found under the `cmd` directory. Run `go build` in the corresponding directories to build each project.
    10  There's also a [Makefile] available for most tasks. 
    11  
    12  ## Running 
    13  
    14  For a full stack with all dependencies, run `docker-compose up` from the `docker` directory. Don't forget to rebuild 
    15  images and containers if you change the code:
    16  
    17      $ cd docker
    18      $ docker-compose down
    19      $ docker-compose up --build
    20      
    21  If you only need the dependencies (Redis, OpenTSDB, HBase) and would like to run Bosun on your machine directly (e.g. to attach
    22  a debugger), you can bring up the dependencies with these three commands from the repository's root:
    23  
    24      $ docker run -p 6379:6379 --name redis redis:6
    25      $ docker build -f docker/opentsdb.Dockerfile -t opentsdb .
    26      $ docker run -p 4242:4242 --name opentsdb opentsdb
    27  
    28  The OpenTSDB container will be reachable at http://localhost:4242. Redis listens on its default port `6379`.
    29  Bosun, if brought up in a Docker container, is available at http://localhost:8070.
    30  
    31  ## Developing
    32  
    33  Install:
    34  
    35  * Run `make deps` and `make testdeps` to set up all dependencies. 
    36  * Run `make generate` when new static assets (like JS and CSS files) are added or changed.
    37  
    38  The `w.sh` script will automatically build and run bosun in a loop.
    39  It will update itself when go/js/ts files change, and it runs in read-only mode, not sending any alerts.
    40  
    41  ```
    42  $ cd cmd/bosun
    43  $ ./w.sh
    44  ```
    45  
    46  Go Version:
    47    * See the version number in `.travis.yml` in the root of this repo for the version of Go to use. 
    48    Generally speaking, you should be able to use newer versions of Go if you are able to build Bosun without error.
    49    
    50  Miniprofiler:
    51   * Bosun includes [miniprofiler] in the web UI which can help with debugging. 
    52   The key combination `ALT-P` will show miniprofiler. This allows you to see timings, as well as the raw queries sent to TSDBs.
    53  
    54  [Makefile]: https://github.com/bosun-monitor/bosun/blob/master/Makefile
    55  [miniprofiler]: https://github.com/MiniProfiler/go