This is the third part in a series of articles regarding Bosun, the first two parts can be found here and here. Now that you have Bosun running and logging metrics from Bosun Reporter and Scollector we should look at configuration!
This article will cover configuration for Bosun running inside a Docker container, if you are running on Windows or Linux things will be a little different but ultimately you will want to locate bosun.toml and edit it with your favorite text editor. For Docker things are slightly more complicated but nothing we can’t manage. Firstly connect to your Docker server (I’d recommend putty and run the following command to list your containers:
sudo docker ps
We should now be greeted with a list of all of the running containers on your Docker server
Ignore most of this, we are only concerned with the container id. Now connect to your container using the exec command.
sudo docker exec -it 10cbc024198e /bin/bash
Now all we need to do is edit bosun.toml using a text editor (I like nano) and set our configuration
nano /data/bosun.toml
At this point we should refer to the Bosun Configuration documentation and set the options we need to set. Once we are happy we can save and exit (ctrl+o, enter, ctrl+x if you are using nano), exit the container shell by using the exit command and restart our container for the configuration to be applied.
sudo docker restart 10cbc024198e