Page 3 of 5

Re: Notifications not being received

Posted: Wed Dec 05, 2018 11:20 am
by snapon_admin

Code: Select all

[root@lisl-ngos-01-pv ~]# php -v
PHP 5.3.3 (cli) (built: Mar 22 2017 12:27:09) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
You have new mail in /var/spool/mail/root
[root@lisl-ngos-01-pv ~]# yum list installed openssl
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
epel/metalink                                                                                                                                                          |  17 kB     00:00     
 * base: ftp.osuosl.org
 * epel: mirror.cogentco.com
 * extras: mirror.tzulo.com
 * updates: ftp.osuosl.org
base                                                                                                                                                                   | 3.7 kB     00:00     
cr                                                                                                                                                                     | 3.3 kB     00:00     
epel                                                                                                                                                                   | 3.2 kB     00:00     
epel/primary                                                                                                                                                           | 3.2 MB     00:00     
epel                                                                                                                                                                              12501/12501
extras                                                                                                                                                                 | 3.4 kB     00:00     
nagios-base                                                                                                                                                            | 1.5 kB     00:00     
nagiosxi-deps                                                                                                                                                          | 1.5 kB     00:00     
updates                                                                                                                                                                | 3.4 kB     00:00     
Installed Packages
openssl.x86_64                                                                               1.0.1e-57.el6                                                                               @base
[root@lisl-ngos-01-pv ~]# 

Re: Notifications not being received

Posted: Wed Dec 05, 2018 2:57 pm
by snapon_admin
When I try to do a yum update for either I jsut get back that no packages are marked for updates.

Re: Notifications not being received

Posted: Wed Dec 05, 2018 4:52 pm
by scottwilkerson
I just confirmed with my colleagues that to force TLS1.2 you need to be running PHP 5.6+

Re: Notifications not being received

Posted: Thu Dec 06, 2018 1:14 pm
by snapon_admin
Ok, how do I update to that? Whenever I run yum update it says no packages marked for update.

Code: Select all

[root@lisl-ngos-01-pv ~]# yum update php
Loaded plugins: fastestmirror, security
Setting up Update Process
Loading mirror speeds from cached hostfile
epel/metalink                                                                                                                                                          |  17 kB     00:00     
 * base: ftp.osuosl.org
 * epel: mirror.cogentco.com
 * extras: bay.uchicago.edu
 * updates: mirror.cs.pitt.edu
base                                                                                                                                                                   | 3.7 kB     00:00     
cr                                                                                                                                                                     | 3.3 kB     00:00     
epel                                                                                                                                                                   | 3.2 kB     00:00     
epel/primary                                                                                                                                                           | 3.2 MB     00:00     
epel                                                                                                                                                                              12501/12501
extras                                                                                                                                                                 | 3.4 kB     00:00     
extras/primary_db                                                                                                                                                      |  27 kB     00:00     
nagios-base                                                                                                                                                            | 1.5 kB     00:00     
nagiosxi-deps                                                                                                                                                          | 1.5 kB     00:00     
updates                                                                                                                                                                | 3.4 kB     00:00     
No Packages marked for Update

Re: Notifications not being received

Posted: Thu Dec 06, 2018 3:04 pm
by scottwilkerson
Upgrading php on that system isn't as strait forward as a yum update, it's a long process.

How to install PHP 5.6 on XI 5.4.9+
===================================
1. Make completes system backup or snapshot in case something goes wrong.
----------
2. Install new PHP version
- Install webtatic repo (example below is for CentOS/RHEL 7)

Code: Select all

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
- Remove PHP 5.x (this will remove ssh2, pear, pecl, HTML_Template_IT, and nagiosxi-deps, this is OK!)

Code: Select all

yum remove -y php*
- Install PHP 5.6

Code: Select all

yum install -y php56w php56w-cli php56w-common php56w-mysql php56w-pdo php56w-devel php56w-mbstring php56w-snmp php56w-snmp php56w-ldap php56w-gd php56w-xml php56w-mysql php56w-mcrypt php56w-process php56w-mssql php56w-pear
- Remove old SG loader file

Code: Select all

rm -rf /usr/lib64/php/modules/ixed.5.3.lin
- Copy new SG loader file

Code: Select all

cd /tmp/nagiosxi/sourceguardian
unzip ixed4.lin.x86-64.zip
cp ixed.5.6.lin /usr/lib64/php/modules
- Upadate SG version in SG ini file

Code: Select all

sed -i "s/5.3/5.6/" /etc/php.d/sourceguardian.ini
- Set PHP timezone (we just use US/Central in the example)

Code: Select all

sed -i "s/;date.timezone.*/date.timezone = US\/Central/" /etc/php.ini
- Restart Apache

Code: Select all

service httpd restart
----------
3. Make sure pear dependencies are installed
- Must install ssh2 (either using pecl or by using php<version>-pecl-ssh2 if available)
(NOTE: Run each command separately one at a time)

Code: Select all

yum install -y libssh2-devel
pecl install ssh2
echo "extension=ssh2.so" > /etc/php.d/ssh2.ini
- Must install HTML_Template_IT from pear

Code: Select all

pear install HTML_Template_IT
- You must restart apache again

Code: Select all

service httpd restart

Re: Notifications not being received

Posted: Fri Dec 07, 2018 11:50 am
by snapon_admin
I think I read that you mentioned that PHP 5.6 is included in Nagios 5.5.7 correct? I have a snapshot of 5.5.7 that was having issues (hence reverting to the 5.4.13 snapshot we're running on currently), that I plan on loading and trying to get working at some point.

Re: Notifications not being received

Posted: Fri Dec 07, 2018 11:57 am
by scottwilkerson
snapon_admin wrote:I think I read that you mentioned that PHP 5.6 is included in Nagios 5.5.7 correct?
No.

We don't include php at all in Nagios XI, it is installed from repositories via yum.

What I mentioned is that we upgraded PHPMailer (which is just some php files used to send mail) but this would not have any impact on the fact that to force TLS 1.2 you need PHP version 5.6+

Re: Notifications not being received

Posted: Fri Dec 07, 2018 5:54 pm
by snapon_admin
Ok. What kind of impact will upgrading PHP have on the system? I'll need to get approval for this change if it ends up being something that would impact monitoring and/or notifications.

Re: Notifications not being received

Posted: Fri Dec 07, 2018 5:58 pm
by scottwilkerson
snapon_admin wrote:Ok. What kind of impact will upgrading PHP have on the system? I'll need to get approval for this change if it ends up being something that would impact monitoring and/or notifications.
If all the steps are followed, and you don't run into any issues, it shouldn't have any impact once complete, however there will be a time while you are upgrading php and all the required packages that notifications will not be able to be sent out.

Re: Notifications not being received

Posted: Thu Dec 20, 2018 2:40 pm
by snapon_admin
Ran into an issue part way through this. I'm on the install 5.6 part and ran into this:

Code: Select all

[root@lisl-ngos-01-pv ~]# yum install -y php56w php56w-cli php56w-common php56w-mysql php56w-pdo php56w-devel php56w-mbstring php56w-snmp php56w-snmp php56w-ldap php56w-gd php56w-xml php56w-mysql php56w-mcrypt php56w-process php56w-mssql php56w-pear
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: repo.miserver.it.umich.edu
 * epel: mirror.steadfastnet.com
 * extras: mirrors.gigenet.com
 * updates: ewr.edge.kernel.org
 * webtatic: us-east.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php56w.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: httpd-mmn = 20120211x8664 for package: php56w-5.6.38-1.w7.x86_64
--> Processing Dependency: libcrypto.so.10(OPENSSL_1.0.2)(64bit) for package: php56w-5.6.38-1.w7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.15)(64bit) for package: php56w-5.6.38-1.w7.x86_64
---> Package php56w-cli.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libcrypto.so.10(OPENSSL_1.0.2)(64bit) for package: php56w-cli-5.6.38-1.w7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.15)(64bit) for package: php56w-cli-5.6.38-1.w7.x86_64
---> Package php56w-common.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libxml2.so.2(LIBXML2_2.9.0)(64bit) for package: php56w-common-5.6.38-1.w7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.15)(64bit) for package: php56w-common-5.6.38-1.w7.x86_64
--> Processing Dependency: libgmp.so.10()(64bit) for package: php56w-common-5.6.38-1.w7.x86_64
---> Package php56w-devel.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: pcre-devel(x86-64) for package: php56w-devel-5.6.38-1.w7.x86_64
--> Processing Dependency: libcrypto.so.10(OPENSSL_1.0.2)(64bit) for package: php56w-devel-5.6.38-1.w7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.15)(64bit) for package: php56w-devel-5.6.38-1.w7.x86_64
---> Package php56w-gd.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libpng15.so.15(PNG15_0)(64bit) for package: php56w-gd-5.6.38-1.w7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: php56w-gd-5.6.38-1.w7.x86_64
--> Processing Dependency: libt1.so.5()(64bit) for package: php56w-gd-5.6.38-1.w7.x86_64
--> Processing Dependency: libpng15.so.15()(64bit) for package: php56w-gd-5.6.38-1.w7.x86_64
---> Package php56w-ldap.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libsasl2.so.3()(64bit) for package: php56w-ldap-5.6.38-1.w7.x86_64
---> Package php56w-mbstring.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: php56w-mbstring-5.6.38-1.w7.x86_64
---> Package php56w-mcrypt.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: php56w-mcrypt-5.6.38-1.w7.x86_64
---> Package php56w-mssql.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: php56w-mssql-5.6.38-1.w7.x86_64
---> Package php56w-mysql.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php56w-mysql-5.6.38-1.w7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: php56w-mysql-5.6.38-1.w7.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php56w-mysql-5.6.38-1.w7.x86_64
---> Package php56w-pdo.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: php56w-pdo-5.6.38-1.w7.x86_64
---> Package php56w-pear.noarch 1:1.10.4-1.w7 will be installed
---> Package php56w-process.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: php56w-process-5.6.38-1.w7.x86_64
---> Package php56w-snmp.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libnetsnmp.so.31()(64bit) for package: php56w-snmp-5.6.38-1.w7.x86_64
---> Package php56w-xml.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libxml2.so.2(LIBXML2_2.9.0)(64bit) for package: php56w-xml-5.6.38-1.w7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: php56w-xml-5.6.38-1.w7.x86_64
--> Running transaction check
---> Package pcre-devel.x86_64 0:7.8-7.el6 will be installed
---> Package php56w.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: httpd-mmn = 20120211x8664 for package: php56w-5.6.38-1.w7.x86_64
--> Processing Dependency: libcrypto.so.10(OPENSSL_1.0.2)(64bit) for package: php56w-5.6.38-1.w7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.15)(64bit) for package: php56w-5.6.38-1.w7.x86_64
---> Package php56w-cli.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libcrypto.so.10(OPENSSL_1.0.2)(64bit) for package: php56w-cli-5.6.38-1.w7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.15)(64bit) for package: php56w-cli-5.6.38-1.w7.x86_64
---> Package php56w-common.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libxml2.so.2(LIBXML2_2.9.0)(64bit) for package: php56w-common-5.6.38-1.w7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.15)(64bit) for package: php56w-common-5.6.38-1.w7.x86_64
--> Processing Dependency: libgmp.so.10()(64bit) for package: php56w-common-5.6.38-1.w7.x86_64
---> Package php56w-devel.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libcrypto.so.10(OPENSSL_1.0.2)(64bit) for package: php56w-devel-5.6.38-1.w7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.15)(64bit) for package: php56w-devel-5.6.38-1.w7.x86_64
---> Package php56w-gd.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libpng15.so.15(PNG15_0)(64bit) for package: php56w-gd-5.6.38-1.w7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: php56w-gd-5.6.38-1.w7.x86_64
--> Processing Dependency: libpng15.so.15()(64bit) for package: php56w-gd-5.6.38-1.w7.x86_64
---> Package php56w-ldap.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libsasl2.so.3()(64bit) for package: php56w-ldap-5.6.38-1.w7.x86_64
---> Package php56w-mbstring.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: php56w-mbstring-5.6.38-1.w7.x86_64
---> Package php56w-mcrypt.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: php56w-mcrypt-5.6.38-1.w7.x86_64
---> Package php56w-mssql.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: php56w-mssql-5.6.38-1.w7.x86_64
---> Package php56w-mysql.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php56w-mysql-5.6.38-1.w7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: php56w-mysql-5.6.38-1.w7.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php56w-mysql-5.6.38-1.w7.x86_64
---> Package php56w-pdo.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: php56w-pdo-5.6.38-1.w7.x86_64
---> Package php56w-process.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: php56w-process-5.6.38-1.w7.x86_64
---> Package php56w-snmp.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libnetsnmp.so.31()(64bit) for package: php56w-snmp-5.6.38-1.w7.x86_64
---> Package php56w-xml.x86_64 0:5.6.38-1.w7 will be installed
--> Processing Dependency: libxml2.so.2(LIBXML2_2.9.0)(64bit) for package: php56w-xml-5.6.38-1.w7.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: php56w-xml-5.6.38-1.w7.x86_64
---> Package t1lib.x86_64 0:5.1.2-6.el6_2.1 will be installed
--> Finished Dependency Resolution
Error: Package: php56w-pdo-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: php56w-mysql-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: php56w-xml-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: php56w-common-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libgmp.so.10()(64bit)
Error: Package: php56w-mysql-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit)
Error: Package: php56w-gd-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libpng15.so.15()(64bit)
Error: Package: php56w-gd-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libpng15.so.15(PNG15_0)(64bit)
Error: Package: php56w-common-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libc.so.6(GLIBC_2.15)(64bit)
Error: Package: php56w-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libc.so.6(GLIBC_2.15)(64bit)
Error: Package: php56w-mbstring-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: php56w-ldap-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libsasl2.so.3()(64bit)
Error: Package: php56w-cli-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libcrypto.so.10(OPENSSL_1.0.2)(64bit)
Error: Package: php56w-mssql-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: php56w-snmp-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libnetsnmp.so.31()(64bit)
Error: Package: php56w-mcrypt-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: php56w-5.6.38-1.w7.x86_64 (webtatic)
           Requires: httpd-mmn = 20120211x8664
           Installed: httpd-2.2.15-60.el6.centos.5.x86_64 (@updates)
               httpd-mmn = 20051115
           Available: httpd-2.2.15-69.el6.centos.x86_64 (base)
               httpd-mmn = 20051115
Error: Package: php56w-devel-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libcrypto.so.10(OPENSSL_1.0.2)(64bit)
Error: Package: php56w-process-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: php56w-xml-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libxml2.so.2(LIBXML2_2.9.0)(64bit)
Error: Package: php56w-common-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libxml2.so.2(LIBXML2_2.9.0)(64bit)
Error: Package: php56w-gd-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: php56w-devel-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libc.so.6(GLIBC_2.15)(64bit)
Error: Package: php56w-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libcrypto.so.10(OPENSSL_1.0.2)(64bit)
Error: Package: php56w-cli-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libc.so.6(GLIBC_2.15)(64bit)
Error: Package: php56w-mysql-5.6.38-1.w7.x86_64 (webtatic)
           Requires: libmysqlclient.so.18()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest