Install and Setup Shinken Network Monitor on Raspberry Pi

Introduction: Install and Setup Shinken Network Monitor on Raspberry Pi

NOTE: shinken was last updated in MAR2016 to a stable release of 2.4.3. So, several years ago I moved on to other ways of doing home network monitoring. In addition, php5 doesn't seem to be available.

So, please do not use this instructable!

Install and setup the latest version of shinken Network Monitor for a home or small business.

At work, my team develops the software for more than 75 server classes, with over 300 instances in multiple data centers and points of presence. There is an experienced operational team that monitors and keeps these servers running 24x7. I don't have anything close to their knowledge or expertise. Besides myself, I have no one supporting my home network. And, I want to spend zero time monitoring and maintaining my home network.

My home LAN has more than 40 connected devices, which is much bigger than I ever expected. Many homes, perhaps even yours, have a large number of connected devices. Examples of networked devices are:

  • laptops and tablets
  • eBook readers
  • cell phones
  • nest thermostats, ring doorbells
  • security system, irrigation system
  • smart TVs, U-verse receivers and DVR
  • streaming media servers (Apple TV, Roku, ChromeCast FireStick)
  • raspberry pi home automation projects

As more home devices become connected, I expect my network to grow.

Why should a home have a network monitor? There are critical servers and services on a home network. Examples of critical servers include: ISP gateway, wireless access point, security system, and irrigation system. Examples of critical services include: backing up PCs or MACs, ensuring Wi-Fi or internet is operating at required speed. To ensure critical services/servers are running, they should be manually checked at regular intervals, which requires a lot of time. Alternatively, the servers should be automatically checked using a network monitor, which attempts to correct the issue and sends an alert if it is unable to correct.

Shinken is a Network Monitor that runs on any computer. In this instructable, I will get it to run a Raspberry Pi (2 or 3) running Diet-Pi or raspbian.

Many excellent network monitoring applications exist. Examples are: SolarWinds, NetCool, and nagios. These applications are capable of monitoring, identifying issues, self-correcting and sending alerts.

In general, I have been trying to keep my network low-cost and simple to maintain and update. I have narrowed my focus to open source applications written in a small number of languages. My languages of choice are: python, bash, html and css.

Shinken is an open source rewrite of nagios in python. So, shinken fits within my limitations and meets my needs.

The instructable provides step-by-step instructions if you want to do it by hand. But, I want a repeatable process, so I also include an unattended install script in the appendix, which does everything with a couple of commands.If something goes wrong, just run the unattended install and it should fix most issues.

Step 1: Gather Parts

Overtime, I have found the parts below perform best in my applications. These parts are more expensive than those contained in the usual starter kit.

Get parts and tools (prices in USD):

    • Raspberry Pi 2 model B (Pi 3) Element14 $35 ($39)
    • Panda 300n WiFi Adapter Amazon $16.99 (not needed if Pi 3 is used)
    • 5.2V 2.1A USB Power Adapter from Amazon $5.99
    • Micro USB to USB cable 3ft from Amazon $4.69
    • CAT5e/6 Ethernet cable $x.xx, depends on the length
    • Case from Amazon $6.99
    • SanDisk Ultra 16 GB microSDHC Class 10 with Adapter (SDSQUAN-016G-G4A) from Amazon $8.99
    • Common or reusable items:
      • MacBook Pro (I use a MAC because it runs linux as its base OS. However, a Windows PC can be used)
      • FTDI TTL-232R-RPI Serial to USB cable from Mouser $15
      • TV with HDMI port
      • USB keyboard
      • USB mouse
      • HDMI Cable (only needed on first pass)


    • Text enclosed in spades, such as, ♣replace-this♣, should be replaced with an actual value. Of course, remove the spades.
    • Commands are indicated by a $. If cut-and-pasting commands, do not copy the $.

    Step 2: Setup Raspberry Pi

    Use this instructable to setup the Raspberry Pi running DietPi. If you prefer, Raspbian can be used with this instructable.

    I changed the hostname to ♣monitor-hostname♣. Replace items in ♣'s with actual values.

    Step 3: Open Terminal Window and Login

    Before each of the following steps:

    • Open a terminal window on a MacBook or PC, and then
    • Login into Raspberry Pi
    $ ssh pi@♣raspberry-pi-ip-address♣

    If you installed avahi-daemon on your Raspberry Pi, then you can login this way (I am lazy and I don't want to remember IP addresses):

    $ ssh pi♣hostname♣.local

    Step 4: Always Upgrade and Update

    Before installing new packages on a server, always update and upgrade.

    • Update downloads latest package lists from appropriate repositories.
    • Upgrade updates the packages
    • Autoremove deletes packages that are no longer needed
    • Reboot is optional. Some services need to be restarted after an upgrade. Rebooting is the lazy way of ensuring all required services are properly restarted
    $ sudo apt-get update -y
    $ sudo apt-get upgrade -y
    $ sudo apt-get autoremove
    $ sudo reboot

    Or you can skip all the remaining steps and use the unattended install in one of the appendices.

    Step 5: Install Shinken Dependencies

    Often shinken runs on a very large server and is installed on a virtual machine (VMs). A large server is capable of running multiple VMs. VMs have many benefits when administering multiple servers, or multiple instances of the same server. VMs make efficient use of expensive server resources.

    A virtual machine can run on Raspberry Pi. However, many of the advantages of running a VM on a $35 Raspberry Pi are lost. Shinken does NOT require a VM. This instructable doesn't use a virtual machine.

    Install shinken dependencies: sqlite3, php5, python3, and some python libraries:

    $ sudo apt-get install sqlite3 -y
    $ sudo apt-get install php5 -y
    $ sudo apt-get install python3 -y
    $ sudo apt-get install python-pip python-pycurl python-cherrypy3 python-setuptools -y

    Step 6: Install Shinken

    Add shinken user and install shaken using pip.

    $ sudo adduser shinken 
    $ sudo pip install shinken 
    $ sudo adduser shinken sudo

    The above installs shinken and some daemons in /etc/init.d:

    • shinken-poller
    • shinken-reactionner
    • shinken-receiver
    • shinken-scheduler
    • shinken-broker

    Step 7: Initialize and Start Shinken

    Just in case shinken is running, stop it. Also, create a log directory and set the permissions.

    $ sudo mkdir /var/log/shinken
    $ sudo chmod 777 /var/log/shinken 
    $ sudo service shinken stop

    Run the following to initialize and start shinken:

    $ sudo shinken --init
    $ sudo /etc/init.d/shinken start

    Verify shinken is configured properly:

    $ /usr/bin/shinken-arbiter -v -c /etc/shinken/shinken.cfg

    Make shinken start on boot

    $ sudo update-rc.d shinken defaults

    Step 8: Setup and Configure Sqlite3

    Setup sqlite to be the shinken database:
    $ sudo shinken install sqlitedb

    Create a configuration file to add sqlite:

    $ sudo nano /etc/shinken/modules/sqlitedb.cfg

    I am using sqlite3. It is unclear how this maps into sqlite3 or into a particular sqlite DB file.

    define module {
        module_name     sqlitedb
        module_type     sqlitedb
        uri             /var/lib/shinken/webui.db

    Change permissions on the file

    $ sudo chmod 777 /etc/shinken/modules/sqlitedb.cfg

    Step 9: Install Shinken Web UI

    Install Shinken's Web UI:

    $ sudo /usr/bin/shinken search webui 
    $ sudo /usr/bin/shinken install webui
    Grabbing : webui
    OK webui

    Edit Web UI configuration and change the entry: CHANGE_ME. I am not sure what it is supposed to be change to. I changed to a random word.

    $ sudo nano /etc/shinken/modules/webui.cfg

    Edit the master broker to include the Web UI modules

    $ sudo nano /etc/shinken/brokers/broker-master.cfg

    Change the line:



    modules webui

    Restart shinken

    $ sudo /etc/init.d/shinken restart

    Step 10: Add Users and Passwords

    Ensure there is method installed to authorize shinken users

    $ sudo shinken install auth-cfg-password
    Edit shinken's Web UI configuration:
    $ sudo nano /etc/shinken/modules/webui.cfg

    Change to look like:

    modules             auth-cfg-password

    Vince35 suggests a restart is needed at this point:

    $ sudo /etc/init.d/shinken restart

    Open a browser window and login using password and username: admin, admin. Enter the following in the browser's URL (remove the spaces around the colon):

    http : //♣hostname♣.local:7767

    login using admin, raspberry-pi-password

    And it should work!

    Step 11: Appendix: References

    Step 12: Appendix: Updates

    15OCT2016: Updated cover image to include Shinken and Raspberry Pi logos

    16OCT2016: Rephrased some passages. No technical changes.

    19OCT2016: Updated instructable and UAI to start shinken on reboot

    Future Enhancements:

    • Add systems to be monitored, either in the instructable or as an appendix with example scripts

    Step 13: Appendix: Troubleshooting

    Change permissions on Directories


    I restarted the Raspberry Pi, but shinken wouldn't start. I couldn't write to the log directories. So, I made the following changes:

    sudo mkdir /var/log/shinken
    sudo chmod 777 /var/log/shinken

    shinken localhost down

    If localhost shows as down.

    $ sudo nano /etc/network/interfaces

    For whatever reason, my /etc/network/interfaces file is usually messed up. Change this one line:

    auto lo iface lo inet loopback

    to these two lines:

    auto lo 
    iface lo inet loopback

    And reboot

    $ sudo reboot

    The init.d should start shinken automatically, but I had to do this:

    $ sudo /etc/init.d/shinken restart

    Step 14: Appendix: Unattended Install

    Make shinken installation and configuration very easy by automating the instructable steps using a bash unattended install script. The script assumes a raspberry pi running raspbian or dietpi, which was setup using one of the embedded links.

    I finished the script on github and

    • tested the source on dietpi
    • tested unattended install script on dietpi
      • ran one time
      • ran multiple times, with CTRL-c interrupts
    • tested unattended install script on raspbian and diet-pi

    The script assumes the username = pi, and the password = raspberry, and the script is trying to install shinken. If these aren't correct, then edit the file accordingly.

    Open terminal window on a MacBook or PC and run the following commands:

    $ ssh pi@♣ip-address♣
    $ sudo wget "
    $ sudo chmod o+x
    $ sudo bash
    $ sudo reboot
    $ sudo /etc/init.d/shinken restart

    The script takes a few minutes to run on diet-pi.

    Be sure to reboot the Raspberry Pi and wait until shinken starts

    Open a browser and in the URL window enter:


    Login in using admin and ♣raspberry-pi-password♣

    And it should work!

    Be the First to Share


      • Woodworking Contest

        Woodworking Contest
      • Electronics Contest

        Electronics Contest
      • Origami Speed Challenge

        Origami Speed Challenge



      1 year ago

      you may need the following for the PHP errors (no candidate)
      $ sudo apt-get install php libapache2-mod-php php-mcrypt


      Question 2 years ago

      Everything up till point 7 works fine. but on the

      $ sudo shinken --init

      command i get

      sudo: shinken: command not found


      Answer 2 years ago

      ... someone else was having this problem


      $ sudo shinken-2.4.3 --init


      Reply 2 years ago

      i have completed step 6.

      i've also tried using sudo shinken-2.4.3 --init . same error


      Reply 2 years ago

      You might want to try ($ which shinken), which should return nothing - meaning it cannot find shinken. So, take a breif look here: It appears that pip installs in the wrong path

      When I wrote this instructable 3+ years ago, I don't remember shinken being available via pypi, and I don't think pypi came installed.

      My pip install of shinken (Step 6) is probably causing the problems. (Run $ pip uninstall shinken)

      Instead of my instructions, you might want to try these instructions:


      Answer 2 years ago

      Well, something must have gone wrong.

      If you did Step 6 and installed shinken and it started running, then shinken is installed.

      My guess is some error should appear when you run this command:
      sudo pip install shinken
      This must have failed. Try it again and let me know what you see.


      Reply 2 years ago

      thanks for the help. it is installed. not sure what is wrong here.


      Question 2 years ago

      I have a problem. at my project using Arduino Yun. app or software to monitoring network activity with how bandwith success and lost on the connection internet of the accsess. or you can tell me code arduino to monitoring it?


      Answer 2 years ago

      No, I cannot help. This is a raspberry pi project. I know nothing about arduino


      3 years ago on Introduction

      So just finishing this up on DietPi attempted to run the Unattend and no joy had to do the following and all is well:

      - Change the $userID to 0 and $USERID to root and password to dietpi (Lazy don't feel like adding a new user)

      - php5 to php, apparently php5 has been obsoleted, bottom line pi could not find it


      4 years ago

      I was getting the Localhost Down, "[Errno 2] No such file or directory" My fix was installing Nagios and Plugins

      sudo apt-get install nagios-plugins -y


      4 years ago


      Great tutorial all appears to be up and running but i am unable to log into the webui. It just says Warning!
      Invalid user or Password. I have no idea where I may have gone wrong.


      Reply 4 years ago

      did you try usr / psswd:admin, raspberry-pi-password

      and did you try restarting


      4 years ago

      hi i have done all the step mention above
      but after i login into webui it shows that
      localhost is DOWN, and description is "[Errno 2] No such file or directory"
      i have no idea how to solve it


      Reply 4 years ago

      #1 Did you try:

      sudo nano /etc/network/interfaces

      and does it look like this (its all on one line):

      auto lo iface lo inet loopback

      but it should look like this:

      auto lo

      iface lo inet loopback

      save and reboot. Open a browser on a PC/MacBook and enter


      #2 run the unattended install script, it can find or fix most issues


      5 years ago

      I made until the step that I see a login page in front of me. But whatever credentials I try nothing works.

      remember I needed to provide a login/pass during installation but left
      the login blank (so it should default to....admin?) and a selfmade

      But also not working to login

      Any ideas?


      Reply 5 years ago

      Already found. After Step 10 and before opening the login page you need to restart shinken first!
      I suggest to change that in your guide :)


      Reply 5 years ago

      I added the step you suggested. Thank You.


      5 years ago

      1. Hostname

      When you set up the raspberry pi, you should have set the hostname. To see the hostname type:

      $ cat /etc/hostname

      which, assumes you set the hostname to shinken.

      If you want to change hostname, use:

      $ sudo nano /etc/hostname

      and change to whatever you want. To save and exit nano editor, use CTRL-o, ENTER, CTRL-x

      2. Also, when you setup raspberry pi, you should have setup avahi. Avahi allows you to access by name rather than IP (my shinken IP is, yours may be different)

      $ sudo apt-get install avahi-daemon

      $ sudo nano /etc/hosts shinken

      To save and exit, use CTRL-o, ENTER, CTRL-x

      $ sudo /etc/init.d/

      $ sudo reboot

      3. Make sure gateway is setup correctly on raspberry pi

      $ sudo route -n

      If your ISP gateway doesn't show with correct address, mine is

      $ sudo route add default gw

      4. Accessing

      If you have already done everything above, then open a browser on laptop or PC and enter the following and remove spaces around the colon, :

      http : //shinken.local:7767

      If you don't want to use avahi, then just use the IP address of your shinken device (mine is and remove spaces around colon:

      http : //