This repository contains Dockerfile for automated builds of:
- Shinken: https://registry.hub.docker.com/u/rohit01/shinken/
- shinken Thruk: https://registry.hub.docker.com/u/rohit01/shinken_thruk/
- shinken Thruk Graphite: https://registry.hub.docker.com/u/rohit01/shinken_thruk_graphite/
-
Install docker. Select and pull one of the following docker image:
- Shinken: It has basic shinken installation along with few must have modules like WebUI (Web Interface), standard nrpe plugins + few extra ones, nrpe-booster support and a lightweight web server (nginx). Link: https://registry.hub.docker.com/u/rohit01/shinken/
- Shinken Thruk: Shinken (as written above) + Thruk web interface. Internal web server nginx is replaced with apache2. Link: https://registry.hub.docker.com/u/rohit01/shinken_thruk/
- Shinken Thruk Graphite: Shinken Thruk (as written above) + graph support in WebUI. Graphs are stored and served using graphite. Retention is configured for 1 month on a per 2 minute basis. Link: https://registry.hub.docker.com/u/rohit01/shinken_thruk_graphite/
Sample Command:
$ sudo docker pull rohit01/shinken
-
Clone this project. There are three directories corresponding to the docker images mentioned above. Go inside the directory corresponding to your selected image. You will see a directory named: custom_configs/. Keep all your configuration files here. A default configuration for monitoring docker host is already defined. User login details can be updated in this file: htpasswd.users. File contains the documentation in comments.
-
Run the docker image. Expose TCP port 80 to the base machine and mount custom_configs directory to /etc/shinken/custom_configs. Sample execution:
$ git clone https://github.com/rohit01/docker_shinken.git $ cd docker_shinken/shinken_basic $ sudo docker run -d -v "$(pwd)/custom_configs:/etc/shinken/custom_configs" -p 80:80 rohit01/shinken
Open your browser and visit these urls (Default credential - admin/admin):
- WebUI: http://localhost/. Available on all three images.
- Thruk UI: http://localhost/thruk/. Available on shinken_thruk and shinken_thruk_graphite images.
- Graphs: http://localhost/service/docker_shinken/http_port_7770#graphs. Available only on shinken_thruk_graphite image.
- Configuration changes are required only in one place/directory: custom_configs
- The nrpe plugins installation directory is /usr/lib/nagios/plugins.
- If you are using custom NRPE plugins, please mount your plugins directory inside docker container at /usr/local/custom_plugins. You need to define resource paths accordingly.
###Using docker-compose and local files:
It is possible to create a customized instance of the Docker image building it from the source.
To do this, make any changes that you need to shinken.cfg
inside the shinken
folder and then build using the provided docker-compose.yml
file provided that docker compose is installed.
```
$ docker-compose build
$ docker-compose up -d
```
If everything worked correctly then browse to the site. If there are problems then run docker-compose up
without the -d
flag and look at the command output to make sure that everything is running as it should.