Introduction

In this tutorial, we’ll sse how to install Shinken on a Linux server. Either way, installation of Shinken is easy and can be done in several ways. The Documentation is very well made and enjoyable to read. But, here we show installation from source and the way to configure Shinken and his web interface.

The various installation of Shinken

If you have seen documentation, there’s 3 different ways to install Shinken:

You are free to install Shinken as you like. But the most important is to use only one way for installation and updates of Shinken ! In any case, you have to mix several types of install under pain of seeing your server crash, have bugs or not work at all! I invite you also to write a small file in your installation directory to note how you installed Shinken and its various modules / libraries.

Prerequisites

Shinken is written in Python, he’ll need a Python version to work (Version 2.6 or more and if possible 2.7 for better performances. He’ll needs too python-pycurl and setuptools.

Here is several steps for this dependencies, knowing this tutorial was made on Ubuntu Server 14.04.4 LTS. Adapt it depending on your configuration.

Install Python

To install Python, nothing’s easier:

sudo apt-get update
sudo apt-get install python

In general, on Ubuntu Server, Python 2.7 is already install by default (and several modules too). That’s possible, it’ll be not available for your distribution via package. Ask then to the site of your distribution or search on to install via other way.

Install PyCurl

To install PyCurl, just install from package :

sudo apt-get install python-pycurl

Install setuptools

The same thing here :

sudo apt-get install python-setuptools

Now, you have all required dependencies installed for Shinken.

Get sources of Shinken

To retrieve the sources of Shinken and especiallu the last release, visit Shinken Repository and download it :

You can of course download with wget or via a graphical interface, but I prefer this method because it will update your version of easier Shinken. With Git you just have to “pull” the new versions and get you back on a tag later.

Install Shinken

Before launch install, you must create a user shinken :

adduser shinken

Once done, you can type following command :

cd ~/shinken
sudo python setup.py install

Normally the installation should proceed without problems. You will have some warning early to signal that it is not Windows. But especially at the end of the installation you will have the following lines:

Finished processing dependencies for Shinken==2.4.2
Changing owner of /etc/shinken to shinken:shinken
Changing owner of /var/run/shinken to shinken:shinken
Changing owner of /var/log/shinken to shinken:shinken
Changing owner of /var/lib/shinken/ to shinken:shinken
Changing owner of /var/lib/shinken/libexec to shinken:shinken
Changing owner of /usr/bin/shinken-receiver to shinken:shinken
Changing owner of /usr/bin/shinken-discovery to shinken:shinken
Changing owner of /usr/bin/shinken-arbiter to shinken:shinken
Changing owner of /usr/bin/shinken-poller to shinken:shinken
Changing owner of /usr/bin/shinken-broker to shinken:shinken
Changing owner of /usr/bin/shinken-scheduler to shinken:shinken
Changing owner of /usr/bin/shinken to shinken:shinken
Changing owner of /usr/bin/shinken-reactionner to shinken:shinken
Notice: for better performances for the daemons communication, you should install the python-cherrypy3 lib
Shinken setup done

As you can see, Shinken give rights to shinken user you’ve set before, to folder he needs. You have nothing to do for that.

He also points out that the daemons of Shinken will perform better if you install the python-cherrypy3 library. This dependency is optional, but you can install it:

Congratulations, your Shinken is now operational and all his daemons are launched. You will be able to monitor the servers in your infrastructure. But to make it more convenient it would be better to install a Web interface.

Install the Web interface

For seeing a more pleasant way if your guests are well monitored, a web interface is available for Shinken . There are 2 versions of this interface :

Webui no more any maintained by developers, this interface is to disappear. But it is still functional.

Webui2 more updated, ergonomic and growing. It is not yet complete but already has everything it takes to be functional.

Log in as shinken:

sudo su - shinken

And initialize the CLI Shinken to generate the file .ini containing the paths to the different configuration directories:

As you can see, by default, Shinken expects to have orders in the /usr/lib/nagios/plugins! But since for now this folder does not exist and there are no control / file check_ping, you report this by setting an error ([Errno 2] No such file or directory).

You have to install Nagios plugins.

Recent version of Shinken may have been solve this problem and put a default command somewhere.

Install Nagios Plugins

To install Nagios plugins, it’s simple, you’ve just to download it on official website : Nagios-plugins.

Your plugins are installed. They may not be installed in the directory /usr/lib/nagios/plugins. In this case , search for where they are (whereis nagios for example) and edit the file /etc/shinken/resource.d/paths.cfg accordingly.

Check on the web interface once every daemons restarted. And then normally your localhost is up (there may be a small delay while Shinken launch well all his daemons)!

Congratulations ! You finally got to monitor a server with Shinken !

Conclusion

Shinken is fairly easy to implement and just requires a little organization during installation of its modules. You can also find a list of these modules on the official website with their different configurations.

Shinken is also capable of displaying graphics on its Web interface or GLPI through plugin glpi_monitoring. You can find tutorials here to make this work on GLPI.