Closed emjhay2004 closed 4 years ago
Hi @emjhay2004, Unfortunately DigitalOcean has no CentOS 8 images yet. How ever. The errors you have are not any errors related to Statusengine code itself. Statusengine requires some php extensions (like redis, gearman and so on). To resolve the issues you only need to install the php extensions.
Please follow the CentOS 7.5 instructions step by step: https://statusengine.org/worker/#installation Even if your target distro is CentOS 8 I guess there are no breaking changes.
You just need to load the EPEL repo for CentOS 8:
yum install http://rpms.remirepo.net/enterprise/remi-release-8.rpm
Will try your suggestion, however there are some changes in CentOS 8 like the python where it is python2 command in CentOS 8 you will need to create a symbolic link for python to be able for the NAGIOS to work (python is the default command of NAGIOS). Still I do not know any other issues that may affect Statusengine, Worker and Broker that will unable to work with CentOS 8.
I have recreated the installation on CentOS8. Created symbolic link for python from python2 Disable Security-Enhanced Linux Install NAGIOS 4.4.5 Install NAGIOS Plugins 2.2.1 Install NCPA 1.1.0
Broker installed successfully from https://statusengine.org/broker/#installation CentOS 7.5 guide
Worker has some issues like: yum-config-manager --enable remi-php72 Error: No matching repo to modify: remi-php72.
yum install git php-cli php-pecl-redis redis php-mysql php-pecl-gearman php-json php-bcmath php-mbstring php-process unzip No match for argument: php-pecl-redis No match for argument: php-mysql No match for argument: php-pecl-gearman Error: Unable to find a match
I can no longer continue the installation of Worker after experiencing the issues on CentOS8.
Hi @emjhay2004, I have added CentOS8 to the docs. Please check https://statusengine.org/worker/#installation for more information. (Maybe reload the page with CTRL+R to disable browser cache)
I also added a tutorial of how to install Nagios or Naemon on Centos 8: https://statusengine.org/tutorials/install-nagios4-centos8/
Nagios is written in C so I don't know why you facing any Python 2 issues. I guess you have a check plugin which is python 2 only and not compatible with PY3.
Disable Security-Enhanced Linux
Sounds good.
I'm not a CentOS user, so if you want to push any improvments to the docs or find some bugs, you are welcome to send a pull request :) https://github.com/statusengine/docs/
Happy holidays 🎄
I am happy to report that the Guide for CentOS 8 is working as it should but with minor issues.
Because we just found out NAGIOS with our supplier / vendor who provides support for NAGIOS Core last year "2019".
Before the NAGIOS Core Installation:
Edit CentOS-PowerTools.repo (/etc/yum.repos.d/CentOS-PowerTools.repo) and set enabled to 1
Install Python2 (required by NCPA for CentOS 8):
yum -y install python2
Check installed python2:
cd /usr/bin
ls -l | grep python2
Copy symbolic link of python2 and to make another symbolic link named ‘python’:
cp -P python2 python
Verify that the symbolic link for python command:
ls -l | grep python2
Check python version:
python -V
Because NCPA uses python only command instead of python2.7 or python2.
Our vendor's installation path for NAGIOS is /usr/local/nagios but with your guide it is /opt/nagios (which also needed by the NAGIOS plugins and Statusengine).
Create User and Group for NAGIOS Core:
make install-groups-users
usermod -a -G nagios apache
Install Service / Daemon:
make install-daemoninit
systemctl enable httpd.service
Install Apache Config Files:
make install-webconf
However I used our vendor's NAGIOS plugins installation guide, as so it will install the actual plugins in /opt/nagios/libexec.
Pre-requisite for NAGIOS plugins:
yum install -y gcc glibc glibc-common make gettext automake autoconf wget openssl-devel net-snmp net-snmp-utils epel-release
yum install -y perl-Net-SNMP
Download the NAGIOS plugins:
cd /tmp
wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugins/nagios-plugins/archive/release-2.2.1.tar.gz
tar zxf nagios-plugins.tar.gz
Compile and Install NAGIOS plugins (configure should include the installation path of NAGIOS via /opt/nagios):
cd /tmp/nagios-plugins-release-2.2.1/
./tools/setup
./configure --prefix=/opt/nagios --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
Also we used our vendor's NCPA plugin installation guide.
Install NCPA:
cd /tmp
wget https://assets.nagios.com/downloads/ncpa/check_ncpa.tar.gz
tar xvf check_ncpa.tar.gz
chown nagios:nagios check_ncpa.py
chmod 775 check_ncpa.py
Move the NCPA plugin to NAGIOS libexec folder:
mv check_ncpa.py /opt/nagios/libexec
Verify the Version of NCPA:
/opt/nagios/libexec/check_ncpa.py -V
After the installation of NAGIOS Core and Plugins I followed your CentOS 8 guide for Broker, Worker and Statusengine UI. Then it went all smoothly but with the minor problem.
The minor problem is the SSL, I have installed Statusengine UI for Apache only, as I experience problem with PHP-FPM and NGINX. Even if SSL certificate is self-signed it does not work on my end. So the solution is not to enable SSL in the VirtualHost of Statusengine UI and comment the redirect in order for the Statusengine UI to work.
I am glad that your system is up and running. I will close this down for now. Feel free to reopen if there are still issues with the CentOS 8 docs.
These are issues when executing "composer install" Problem 1
So, I have already forced the composer to download the vendor folder.
When running "/opt/statusengine/worker/bin/Console.php"
PHP Fatal error: Uncaught Error: Class 'Symfony\Component\Yaml\Parser' not found in /opt/statusengine/worker/src/Config.php:64 Stack trace:
0 /opt/statusengine/worker/src/Config.php(51): Statusengine\Config->parse()
1 /opt/statusengine/worker/bin/Console.php(28): Statusengine\Config->__construct()
2 {main}
thrown in /opt/statusengine/worker/src/Config.php on line 64