Nagios - support new stuff

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
reincarne
Posts: 146
Joined: Wed Jun 26, 2013 4:39 am

Nagios - support new stuff

Post by reincarne »

Hi,
I wrote this post also in Nagios ideas. Adding this here as it can also help others. Please consider to add it as bug fixes or support for new features.
Recently I upgrade our linux instance to Amazon instance.
I started to make changes in order to make Nagios more friendly with Amazon instance , because I know you don't support it yet, however, here are some friendly changes I already did to make stuff work:

in file:
/usr/local/nagiosxi/var/xi-sys.cfg
"distro" parameter and "dist" Recognizing that this is an Amazon instance, so their parameters are automatically set to:
distro='Amazon Linux'
dist='amazon'


Cause of the, Nagios doesn't know how to handle the local service. In order to make it work, I added support for Amazon distro in:
/usr/local/nagiosxi/scripts/manage_services.sh
by adding these lines
"$distro" == "Amazon Linux"
So now the full line looks like this:
if [ "$distro" == "CentOS" ] || [ "$distro" == "RedHatEnterpriseServer" ] || [ "$distro" == "EnterpriseEnterpriseServer" ] || [ "$distro" == "OracleServer" ] || [ "$distro" == "Amazon Linux" ]; then

Another change that we did as a result of compliance issues, is upgrading our php version from 5.4 to 7.2.13.
It seems like Nagios deffinately doesn't support it yet, however I found a bug which I fixed today.
On the new PHP version, the NRDS won't open the config files, as it leave the page blank due to http error 500:
[04/Mar/2019:11:18:00 +0000] "GET /nagiosxi/includes/components/nrdsconfigmanager/nrdsconfigmanager.php?mode=edit&edit=NRDP_Jenkins&dir=configs HTTP/1.1" 500 -

Which is an issue with one of the files:
[Mon Mar 04 11:25:17.317893 2019] [php7:warn] [pid 24008] [client X.X.X.X:65253] PHP Warning: Illegal string offset 'SEND_NRDP' in /usr/local/nagiosxi/html/includes/components/nrdsconfigmanager/nrdsconfigmanager.php on line 415, referer: https://nagios.trusteer.net/nagiosxi/admin/

In order to fix it, I had to define one of the variables as an array by adding:
$configvar = array();
to line 405 to the nrdsconfigmanager.php file.

If you can add these code lines in one of the version so each upgrade I won't have to do it manually - I will be thankful :)
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Nagios - support new stuff

Post by benjaminsmith »

Hello @reincarne,

Thanks for the input. It looks like you were able to get Nagios XI running successfully on Amazon Linux. Officially, we haven't rolled out support for Amazon Linux. We've been busy testing and launching support on Ubuntu / Debian for all of our products. However, I just had a brief conversation with one of our developers regarding the Amazon Linux and your request and code changes.

As far as PHP 7 goes, yes it will work with Nagios XI. However, we support whatever version that is included with the supported operating systems. Right now, that is php 5.x on RHEL / CentOS and php 7.x on Ubunut / Debian.

Let me know if you have any questions or comments. Thank you.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
reincarne
Posts: 146
Joined: Wed Jun 26, 2013 4:39 am

Re: Nagios - support new stuff

Post by reincarne »

Thanks for the reply.
No question, just wanted to be helpful :)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios - support new stuff

Post by scottwilkerson »

reincarne wrote:Thanks for the reply.
No question, just wanted to be helpful :)
Thanks!
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked