Page 2 of 3
Re: Sending EMail via TLS
Posted: Thu Apr 01, 2021 2:51 pm
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?
Re: Sending EMail via TLS
Posted: Tue Apr 06, 2021 6:02 am
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
Re: Sending EMail via TLS
Posted: Tue Apr 06, 2021 10:03 am
by dchurch
There's your problem. You need to be on PHP 5.6.8 or higher for TLS 1.2.
Re: Sending EMail via TLS
Posted: Tue Apr 06, 2021 11:49 am
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
Re: Sending EMail via TLS
Posted: Tue Apr 06, 2021 1:07 pm
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
Re: Sending EMail via TLS
Posted: Tue Apr 06, 2021 1:49 pm
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.
Re: Sending EMail via TLS
Posted: Wed Apr 07, 2021 5:13 am
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
Re: Sending EMail via TLS
Posted: Wed Apr 07, 2021 5:36 am
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
Re: Sending EMail via TLS
Posted: Wed Apr 07, 2021 3:40 pm
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.
Re: Sending EMail via TLS
Posted: Thu Apr 08, 2021 2:33 am
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