Nagios - support new stuff

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Nagios - support new stuff

Postby reincarne » Mon Mar 04, 2019 6:57 am

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:
"distro" parameter and "dist" Recognizing that this is an Amazon instance, so their parameters are automatically set to:
distro='Amazon Linux'

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:
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:

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 :)
Posts: 146
Joined: Wed Jun 26, 2013 4:39 am

Re: Nagios - support new stuff

Postby benjaminsmith » Mon Mar 04, 2019 10:55 am

Hi @reincarne,

I'm going to close this post as I see you have posted this in the Nagios XI forum as well.

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!
User avatar
Posts: 3283
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Return to Community Support

Who is online

Users browsing this forum: Google [Bot], sani2546 and 41 guests