Problems with new installation of Core-4.2.4 with Redhat 7.2

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Problems with new installation of Core-4.2.4 with Redhat 7.2

Post by neworderfac33 »

Good afternoon - I've recently installed a copy of Core 4.2.4 on a new server and copied over the config files from my 4.0.8 installation.
I can see all my hosts and hostgroups in the 4.2.4 installation webpage - BUT - for all my hosts, using the commands as defined within services.cfg, all instances of:

check_nt!USEDDISKSPACE!-l c -w 90 -c 95
or:
check_nt!USEDDISKSPACE!-l e -w 90 -c 95 report EITHER

Code: Select all

could not fetch information from server
OR

Code: Select all

Free disk space : Invalid drive 
check_command check_nt!MEMUSE!-w 90 -c 95 reports:

Code: Select all

could not fetch information from server
Also, service definitions to return the status of Jenkins Slave and Tomcat services
check_nt!SERVICESTATE!-d SHOWALL -l Tomcat7
check_nt!SERVICESTATE!-d SHOWALL -l jenkinsslave-E___Jenkins-Slave
report:

Code: Select all

could not fetch information from server
In fact, the only check_nt command that reports correctly across the board is:
check_command check_nt!CPULOAD!-l 5,90,95

Plugins version is 2.1.4

OS version is Redhat 7.2

cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.2 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.2"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.2 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.2:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.2
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.2"

Needless to say, everything works perfectly in my 4.0.8/RedHat 6 installation

I also have NagiosGraph installed on this server, but when I attempt to access, it reports:

Code: Select all

You don't have permission to access /nagiosgraph/cgi-bin/show.cgi on this server.
Any offers, good people?

Cheers

Pete
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Problems with new installation of Core-4.2.4 with Redhat

Post by rkennedy »

You'll more than likely need to modify the nsclient.ini file on the client side, and modify the allowed hosts = to include your new Nagios IP.

The error message you're seeing correlates exactly to that -

Code: Select all

[root@centos7x64 libexec]# ./check_nt -H 192.168.5.47 -p 12489 -v USEDDISKSPACE -l C
could not fetch information from server
[root@centos7x64 libexec]# ./check_nt -H 192.168.5.47 -p 12489 -v USEDDISKSPACE -l C
could not fetch information from server
[root@centos7x64 libexec]# ./check_nt -H 192.168.5.47 -p 12489 -v USEDDISKSPACE -l C
could not fetch information from server
nsclient.log

Code: Select all

2017-01-17 12:11:27: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 192.168.47.15
2017-01-17 12:11:27: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 192.168.47.15
2017-01-17 12:11:27: error:c:\source\nscp\include\check_nt/server/protocol.hpp:67: Rejected connection from: 192.168.47.15
As for the nagiosgraph portion, it sounds like permissions, but it's hard to say since it isn't our product. We're limited on the support we can provide for it.
Former Nagios Employee
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Re: Problems with new installation of Core-4.2.4 with Redhat

Post by neworderfac33 »

Doh! - bearing in mind that the CPU monitoring appeared to be working (which is puzzling... isn't it? That should have been reporting an error too if it was the server IP in the NSClient config? ) I didn't think of the obvious - but you're right - that was it!

Re: NagiosGraph, if anyone's interested, you need (in the file /usr/local/nagiosgraph/etc/nagiosgraph-apache.conf) to add “Require all granted” below both occurrences of “Allow from all”

Two days, that's taken us to work out, but it might help someone else in the future!

Thanks

Pete
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Problems with new installation of Core-4.2.4 with Redhat

Post by rkennedy »

That is strange, not sure - but, glad to hear it working now!

That sounds like it changed from apache2.2 -> apache2.4 - thanks for sharing the solution.

Are we good to lock this thread up?
Former Nagios Employee
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Re: Problems with new installation of Core-4.2.4 with Redhat

Post by neworderfac33 »

Yep - close away - and thanks for your help! :-)

Pete
Locked