Public | Automated Build

Last pushed: 3 months ago
Short Description
Short description is empty for this repo.
Full Description

Shinken Basic

It has basic shinken installation along with few must have modules like WebUI2 (Web Interface), standard nrpe plugins + few extra ones, nrpe-booster support and a lightweight web server (nginx).

How to run:

$ 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

Once done, visit this url: http://localhost/
Default credentials: admin/admin

Note:

  • custom_configs/: Add all you configuration files here.
  • custom_configs/htpasswd.users: Define user login credentials here. Documentation is written as comments in this file.
  • 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.

Docker registry link: https://registry.hub.docker.com/u/rohit01/shinken/

Alternative Installation:

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.

WebUI2 - Using the worldmap:

The worldmap plugin has been added. In order to use it you need to customize the file shinken/webui2_worldmap.cfg.

Change the map initial location in the file by modifying the lines

        default_lat=40.498065
        default_lng=-73.781811

Then in your host or in a host template you need the following attributes:

     _LOC_LAT
     _LOC_LNG

For example for each one of my closets I have a template which only contains the location
the name is map-[closet_name] . All the hosts in that closet then get added this host template
which then can be conveniently added without having to work with lat and lng coordinates

    # A sample location host template
    define host {
      name        map-rcs-idf01
      _LOC_LAT    32.497316
      _LOC_LNG    -114.782483
      register    0
    }
Docker Pull Command
Owner
rohit01
Source Repository

Comments (3)
qafro
2 years ago

@zoza1982 admin/admin didn't work even after editing that file with a new admin:$apr1$nX0Qf9qb$MzAR63Rh6vcUnQKLgo37A/

Any idea?

zoza1982
2 years ago

For those who can't log in ...
inside of your custom_config folder which is mounted against container add the following into new file ( htpasswd.users) .

admin:$apr1$nX0Qf9qb$MzAR63Rh6vcUnQKLgo37A/

save the file

This results in username admin and password admin.
Try logging in again with admin/admin

If you want to setup custom password...you have to download package apache2-utils which will contain tool htpasswd.

One done ...create your own htpasswd file:

htpasswd -c htpasswd.users myusername

It will ask you for a password twice and it will generate the hash inside of file.

imiell
2 years ago

admin/admin didn't work for me

imiell@Think-PC:~/docker_shinken/shinken_basic$ docker run -ti -v "$(pwd)/custom_configs:/etc/shinken/custom_configs" -p 80:80 rohit01/shinken
Usage of loopback devices is strongly discouraged for production use. Either use --storage-opt dm.thinpooldev or use --storage-opt dm.no_warn_on_loop_devices=true to suppress this warning.
2015-10-11 12:06:43,478 CRIT Supervisor running as root (no user in config file)
2015-10-11 12:06:43,478 WARN Included extra file "/etc/supervisor/conf.d/shinken-reactionner.conf" during parsing
2015-10-11 12:06:43,478 WARN Included extra file "/etc/supervisor/conf.d/shinken-receiver.conf" during parsing
2015-10-11 12:06:43,478 WARN Included extra file "/etc/supervisor/conf.d/nginx.conf" during parsing
2015-10-11 12:06:43,478 WARN Included extra file "/etc/supervisor/conf.d/shinken-broker.conf" during parsing
2015-10-11 12:06:43,478 WARN Included extra file "/etc/supervisor/conf.d/ntpd.conf" during parsing
2015-10-11 12:06:43,478 WARN Included extra file "/etc/supervisor/conf.d/shinken-poller.conf" during parsing
2015-10-11 12:06:43,478 WARN Included extra file "/etc/supervisor/conf.d/watch_shinken_config.conf" during parsing
2015-10-11 12:06:43,478 WARN Included extra file "/etc/supervisor/conf.d/shinken-arbiter.conf" during parsing
2015-10-11 12:06:43,478 WARN Included extra file "/etc/supervisor/conf.d/shinken-scheduler.conf" during parsing
2015-10-11 12:06:43,536 INFO RPC interface 'supervisor' initialized
2015-10-11 12:06:43,537 WARN cElementTree not installed, using slower XML parser for XML-RPC
2015-10-11 12:06:43,537 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2015-10-11 12:06:43,537 INFO supervisord started with pid 1
2015-10-11 12:06:44,540 INFO spawned: 'ntpd' with pid 5
2015-10-11 12:06:44,543 INFO spawned: 'shinken-receiver' with pid 6
2015-10-11 12:06:44,545 INFO spawned: 'shinken-reactionner' with pid 7
2015-10-11 12:06:44,548 INFO spawned: 'shinken-poller' with pid 8
2015-10-11 12:06:44,552 INFO spawned: 'shinken-arbiter' with pid 9
2015-10-11 12:06:44,557 INFO spawned: 'nginx' with pid 10
2015-10-11 12:06:44,560 INFO spawned: 'watch_shinken_config' with pid 11
2015-10-11 12:06:44,564 INFO spawned: 'shinken-scheduler' with pid 12
2015-10-11 12:06:44,568 INFO spawned: 'shinken-broker' with pid 13
2015-10-11 12:06:44,959 INFO stopped: shinken-arbiter (terminated by SIGTERM)
2015-10-11 12:06:45,182 INFO spawned: 'shinken-arbiter' with pid 22
2015-10-11 12:06:45,539 INFO success: ntpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-10-11 12:06:45,681 INFO success: shinken-receiver entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-10-11 12:06:45,681 INFO success: shinken-reactionner entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-10-11 12:06:45,681 INFO success: shinken-poller entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-10-11 12:06:45,681 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-10-11 12:06:45,681 INFO success: watch_shinken_config entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-10-11 12:06:45,681 INFO success: shinken-scheduler entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-10-11 12:06:45,682 INFO success: shinken-broker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-10-11 12:06:46,297 INFO success: shinken-arbiter entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-10-11 12:06:48,813 INFO stopped: shinken-arbiter (exit status 0)
2015-10-11 12:06:49,675 INFO spawned: 'shinken-arbiter' with pid 212
2015-10-11 12:06:50,674 INFO success: shinken-arbiter entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-10-11 12:06:54,265 INFO stopped: shinken-arbiter (exit status 0)
2015-10-11 12:06:54,900 INFO spawned: 'shinken-arbiter' with pid 228
2015-10-11 12:06:55,899 INFO success: shinken-arbiter entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-10-11 12:07:00,396 INFO stopped: shinken-arbiter (exit status 0)
2015-10-11 12:07:01,129 INFO spawned: 'shinken-arbiter' with pid 244
2015-10-11 12:07:02,128 INFO success: shinken-arbiter entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-10-11 12:07:06,675 INFO stopped: shinken-arbiter (exit status 0)
2015-10-11 12:07:07,404 INFO spawned: 'shinken-arbiter' with pid 260
2015-10-11 12:07:08,403 INFO success: shinken-arbiter entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-10-11 12:07:12,083 INFO stopped: shinken-arbiter (exit status 0)
2015-10-11 12:07:12,713 INFO spawned: 'shinken-arbiter' with pid 276
2015-10-11 12:07:13,712 INFO success: shinken-arbiter entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-10-11 12:07:17,370 INFO stopped: shinken-arbiter (exit status 0)
2015-10-11 12:07:17,996 INFO spawned: 'shinken-arbiter' with pid 292
2015-10-11 12:07:18,994 INFO success: shinken-arbiter entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-10-11 12:07:23,501 INFO stopped: shinken-arbiter (exit status 0)