Hi Tech Guys,
Shinken is a monitoring framework, one of the best open-source alternative to Nagios® Core, completely rewrited in python that enhancing flexibility and large environment management.
You can Keep your old Nagios® configuration and plugins if you willing to switch your monitoring system to Shinken.
More information on Official Shinken Monitoring website.
Requirements:
-Centos 7+ server with minimal hardware configuration (depends of your needs).
-ROOT permission on server.
-Internet connection to download all needed packages.
-Good IT knowledge and a bit of patience…
This time we will give you 2 possibility to install this software, the first is for lazy admins through a script and the second is for who love manual install, choose the way you like more!
We prepared a script (only for Centos 7+) that will update your system, download all required packages, add firewall exception, install last version of shinken, resolve some problems and run the webui2 module.
Compare it!
md5sum -c md5.text
If says OK, proceding with decompression of the tar archive, add the executions permission at the script and run automagic installation!
untar -xvzf shinkencentos7setup.tar.gz cd shinkeninstall chmod +x shinkencentos7setup.sh ./shinkencentos7setup.sh
If everything will go smooth, login at “your IP or hostname” :7767 with default password admin/admin
This script will create a Centos user named “shinken” with pass “ShinPass”.
In this tutorial we are using a clean install of Centos 7.4, after setting up a static ip and hostname proceed to install required packages.
Install some useful packages, wget to download, network tools (always useful to troubleshoot network), htop to monitor the hardware and processes.
yum install wget net-tools htop
Install the mandatory packages requirements
yum install -y epel-release yum install -y python-setuptools yum install -y redhat-lsb python-crypto mongodb mongodb-server httpd-tools openssl
Python 2.6 is the minimum version requirements but with 2.7 will get higher performance.
Check your version and decide which is the best for your installation:
python -V
Get Python-pycurl package for Shinken daemon communication
yum install python-pycurl
Add Python pip and update to last version for install setuptools or distribute Python package
yum install python-pip pip install --upgrade pip pip install setuptools
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already satisfied: setuptools in /usr/lib/python2.7/site-packages (0.9.8)
python-cherrypy3 (recommended) enhanced daemons communications, especially in HTTPS mode
yum install python-cherrypy
Monitoring Plugins (recommended) provides a set of plugins to monitor host (Shinken uses check_icmp by default install). Monitoring plugins are available on most linux distributions (nagios-plugins package) or manual download from here! in case of problems!
Some plugins require that you have additional programs and/or libraries installed on your system before they can be used.
Plugins that are dependent on other programs/libraries that are missing are usually not compiled.
Requirements for various plugins info and details are listed in this address.
yum install nagios-plugins
Start the Installation of Shinken Monitoring from sources!
After that, create a user and download last stable Shinken tarball archive (or get the latest git snapshot) extract it somewhere and install:
adduser shinken passwd shinken
Choose and insert password
wget https://codeload.github.com/naparuba/shinken/tar.gz/2.4.3 tar -xvzf 2.4.3 cd shinken-2.4.3 python setup.py install
Install requirement from list with pip and initialize.
pip install -r https://raw.githubusercontent.com/shinken-monitoring/mod-webui/develop/requirements.txt shinken --init
With shinken command install modules named webui2, simple-log add it in the /etc/shinken/brokers/broker-master.cfg with sed and re-init.
shinken install webui2 shinken install simple-log sed -i 's/modules/modules simple-log,webui2/g' /etc/shinken/brokers/broker-master.cfg shinken --init
Enable services at boot and start it
systemctl enable shinken systemctl start shinken systemctl enable mongod systemctl start mongod
I had some problem to start shinken service, however i solved reading the systemctl output and if there are some text similarly or related path of $curpath, use the sed command (copy spaces also) above to correct it and re-run daemon and service!
sed -i 's+$curpath/../../var+$curpath/../../../var+g' /etc/rc.d/init.d/shinken sed -i 's+$curpath/../../etc+$curpath/../../../etc+g' /etc/rc.d/init.d/shinken systemctl daemon-reload systemctl restart shinken
In conclusion, add firewall exceptions to access administration dashboard
firewall-cmd --zone=public --permanent --add-port=7767/tcp firewall-cmd --reload
login at “your IP or hostname” :7767 with default password admin/admin
—>>> ENJOY!!! <<<—
About the author