Coder Social home page Coder Social logo

1181254 / docker_shinken Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rohit01/docker_shinken

0.0 1.0 0.0 509 KB

Automated docker builds for shinken images

Home Page: http://www.rohit.io/blog/rip-nagios-hello-docker-shinken.html

Dockerfile 8.18% Shell 39.35% Perl 34.78% Ruby 17.61% Python 0.08%

docker_shinken's Introduction

Docker Shinken

This repository contains Dockerfile for automated builds of:

Get started in 3 easy steps:

  1. Install docker. Select and pull one of the following docker image:

    Sample Command: $ sudo docker pull rohit01/shinken

  2. 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.

  3. 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):

  1. WebUI2: http://localhost/. Available on all three images.
  2. Thruk UI: http://localhost/thruk/. Available on shinken_thruk and shinken_thruk_graphite images.
  3. Graphs: http://localhost/service/docker_shinken/http_port_7770#graphs. Available only on shinken_thruk_graphite image.

Please Note:

  • 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.

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_shinken's People

Contributors

jangeador avatar lynchc avatar orabig avatar rohit01 avatar romuaa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.