Sending EMail via TLS

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: Sending EMail via TLS

Post by dchurch »

You need to be on PHP 5.6.8 or higher for TLS 1.2. What's the output from the following command?

Code: Select all

php --version
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
mccrakem
Posts: 129
Joined: Mon Jun 19, 2017 8:28 am

Re: Sending EMail via TLS

Post by mccrakem »

Hi

[root@swy01opngios02 ~]# php --version
PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

Thanks
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: Sending EMail via TLS

Post by dchurch »

There's your problem. You need to be on PHP 5.6.8 or higher for TLS 1.2.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
mccrakem
Posts: 129
Joined: Mon Jun 19, 2017 8:28 am

Re: Sending EMail via TLS

Post by mccrakem »

Hi
Do you have any instructions on how to upgrade from 5.6 to 7.4
I have tried 3 different way and none of them work.
1 ended up with me just getting a 403 error when I tried to connect to the login page

Thanks
mccrakem
Posts: 129
Joined: Mon Jun 19, 2017 8:28 am

Re: Sending EMail via TLS

Post by mccrakem »

Hi
I just came across this earlier
https://support.nagios.com/kb/article/n ... 7-860.html

Once I followed these steps and then resolved 1 or 2 more issues that came out of this upgrade I can now send emails with the TLS switch enabled

The other issue I ran into was the following Components not running:

Database Maintenance
Command Subsystem
Event Manager
Feed Processor
Report Engine
Cleaner
Nonstop Operations Manager
System Statistics

Checked the log and seen this
PHP script '/usr/local/nagiosxi/html/includes/dbl.inc.php' is protected by SourceGuardian and requires a SourceGuardian loader 'ixed.7.4.lin' to be installed.

So I did the following
1) Download the required loader 'ixed.7.4.lin' from the SourceGuardian site: http://www.sourceguardian.com/loaders/d ... s_m=x86_64
2) Install the loader to /usr/lib64/php/modules
3) Edit /etc/php.ini and add 'extension=ixed.7.4.lin' directive

Looks like all is ok now

Thanks
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: Sending EMail via TLS

Post by dchurch »

Great to hear that! Some of our other users have had a lot of trouble installing SourceGuardian and getting it working, so you must know your way around PHP extensions really well, which is helpful :-)

Let us know if you have any related questions or if we're okay to lock this up and mark it as resolved.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
mccrakem
Posts: 129
Joined: Mon Jun 19, 2017 8:28 am

Re: Sending EMail via TLS

Post by mccrakem »

Hi

I just have one question
When I check the /usr/local/nagiosxi/var/cmdsubsys.log while running a Apply Configuration I am seeing alot of the following entry
The Apply finishes ok and I have added a New Monitor for a Windows Server
So Host and Services have been added and seem to be working ok, but just wanted to ask if this is a issue that I should look into more

PHP Warning: preg_match(): Unknown modifier 'd' in /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/get_config_string.inc.php on line 69
PHP Warning: preg_match(): Unknown modifier 'd' in /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/get_config_string.inc.php on line 69
PHP Warning: preg_match(): Unknown modifier 'd' in /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/get_config_string.inc.php on line 69
.PHP Warning: preg_match(): Unknown modifier 'd' in /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/get_config_array.inc.php on line 76
PHP Warning: preg_match(): Unknown modifier 'd' in /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/get_config_array.inc.php on line 76
PHP Warning: preg_match(): Unknown modifier 'd' in /usr/local/nagiosxi/html/includes/components/nagiosbpi/functions/get_config_array.inc.php on line 76

There is a Large number of each and only messages with lines 69 and 76 show in the log

The log file finishes with

Unable to find BPI group with ID: GK/Admin
Unable to find BPI group with ID: hg_GK/Admin
CMD: syncall
MSG: Unable to find group in config file, no changes made.Unable to find group in config file, no changes made.BPI configuration applied successfully! BPI configuration applied successfully!
OUTPUT=MSG: Unable to find group in config file, no changes made.Unable to find group in config file, no changes made.BPI configuration applied successfully! BPI configuration applied successfully!
RETURNCODE=2

If I check the BPI.log file, I just see the following
BEGIN BPI LOG 1440603215
CONFIG ERRORS: whaenel1485946520Error: Can't find a service with host:localhost service:Current Load, check configuration for group: 'localServices1'<br />Error: Can't find a service with host:localhost service:Current Users, check configuration for group: 'localServices1'<br />Error: Can't find a service with host:localhost service:HTTP, check configuration for group: 'localServices1'<br />Error: Can't find a service with host:localhost service:PING, check configuration for group: 'localServices1'<br />Error: Can't find a service with host:localhost service:Root Partition, check configuration for group: 'localServices2'<br />Error: Can't find a service with host:localhost service:SSH, check configuration for group: 'localServices2'<br />Error: Can't find a service with host:localhost service:Swap Usage, check configuration for group: 'localServices2'<br />Error: Can't find a service with host:localhost service:Total Processes, check configuration for group: 'localServices2'<br />


So I checked the the BPI.conf file and that is werid
There is the description and then localservices1 and localservice2 are defined
Then there is approx 140 of blank lines

Then GK/Admin is defined
Then approx another 130 Blank lines

The hg_GK/Admin is defined
Then approx 265 of Blank line until the end of the file

I have attached a copy of the file so you can see
You do not have the required permissions to view the files attached to this post.
mccrakem
Posts: 129
Joined: Mon Jun 19, 2017 8:28 am

Re: Sending EMail via TLS

Post by mccrakem »

Hi
Sorry about this but I took out those 2 GK/Admin and hg_GK/Admin sections from the BPI.conf File and everything seems fine now after running a few Database repairs

Last question when I run a Apply Config I do see this in the log file

RETURNCODE=0
PROCESSING COMMAND ID 19319...
PROCESS COMMAND: CMD=1160, DATA=
CMDLINE=/bin/true
OUTPUT=
RETURNCODE=0
PROCESSING COMMAND ID 19320...
PROCESS COMMAND: CMD=1150, DATA=remove
CMDLINE=php /usr/local/nagiosxi/html/includes/components/nagiosbpi/api_tool.php --cmd=syncall
PHP Warning: count(): Parameter must be an array or an object that implements Countable in /usr/local/nagiosxi/html/includes/components/nagiosbpi/classes/BpGroup_class.php on line 837
PHP Warning: count(): Parameter must be an array or an object that implements Countable in /usr/local/nagiosxi/html/includes/components/nagiosbpi/classes/BpGroup_class.php on line 837
CMD: syncall
MSG: BPI configuration applied successfully! BPI configuration applied successfully!
OUTPUT=MSG: BPI configuration applied successfully! BPI configuration applied successfully!
RETURNCODE=0

PROCESSED 3 COMMANDS


I don't think there is anything to worry about but just wanted to ask
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: Sending EMail via TLS

Post by dchurch »

The PHP errors you're seeing are due to bugs that have been fixed already in newer versions of the Nagios BPI component.

Upgrade the component to remedy the error. Do this by going to Admin => Manage Components, have it check for updates, and install them.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
mccrakem
Posts: 129
Joined: Mon Jun 19, 2017 8:28 am

Re: Sending EMail via TLS

Post by mccrakem »

Hi

Thank you, I have updated the Component and all looks like it is working fine
Thank you for you help with this you can close this Ticket
Locked