check_nrpe!check_cpu failing on new CentOS8 Server
check_nrpe!check_cpu failing on new CentOS8 Server
Hi
We are testing Nagios Agent on CentOS8 and I have come across 1 issue
I have tried a few thing but nothing seems to have corrected the problem
If I go to Configure, Core Configure manager and then Services
I goto one of the servers that the check_cpu monitor works on
So the command is basically
Check Command = check_nrpe
$ARG1$ = check-cpu
so if I click on the "Test Check Command" Button
and paste in one of our RHEL6 Servers I get the following details
COMMAND: /usr/local/nagios/libexec/check_nrpe -H bwylbopjiras02 -t 30 -c check_cpu
OUTPUT: DM-CPU OK - Idle=98.25% | user=1.05%;60;70 nice=0.00%;60;70 system=0.60%;60;70 idle=98.25%;100;100 iowait=0.10%;80;90 irq=0.00%;60;70 softirq=0.00%;60;70
If I Do the same but specify the hostname of the new CentOS 8 Server I just get the following
COMMAND: /usr/local/nagios/libexec/check_nrpe -H dwylbopsndbx14 -t 30 -c check_cpu
OUTPUT: NRPE: Unable to read output
The two systems have both got the same configuration of the nrpe.cfg files
On the new CentOS 8 system we have 4 monitors configured
/Disk Usage This is configured as - check_nrpe check_disk
Load This is configured as - check_nrpe check_load
Memory Usage This is configured as - check_nrpe check_mem
These 3 work fine so this is why I am puzzled
any help would be appreciated
Thanks
We are testing Nagios Agent on CentOS8 and I have come across 1 issue
I have tried a few thing but nothing seems to have corrected the problem
If I go to Configure, Core Configure manager and then Services
I goto one of the servers that the check_cpu monitor works on
So the command is basically
Check Command = check_nrpe
$ARG1$ = check-cpu
so if I click on the "Test Check Command" Button
and paste in one of our RHEL6 Servers I get the following details
COMMAND: /usr/local/nagios/libexec/check_nrpe -H bwylbopjiras02 -t 30 -c check_cpu
OUTPUT: DM-CPU OK - Idle=98.25% | user=1.05%;60;70 nice=0.00%;60;70 system=0.60%;60;70 idle=98.25%;100;100 iowait=0.10%;80;90 irq=0.00%;60;70 softirq=0.00%;60;70
If I Do the same but specify the hostname of the new CentOS 8 Server I just get the following
COMMAND: /usr/local/nagios/libexec/check_nrpe -H dwylbopsndbx14 -t 30 -c check_cpu
OUTPUT: NRPE: Unable to read output
The two systems have both got the same configuration of the nrpe.cfg files
On the new CentOS 8 system we have 4 monitors configured
/Disk Usage This is configured as - check_nrpe check_disk
Load This is configured as - check_nrpe check_load
Memory Usage This is configured as - check_nrpe check_mem
These 3 work fine so this is why I am puzzled
any help would be appreciated
Thanks
Re: check_nrpe!check_cpu failing on new CentOS8 Server
Sorry just a quick question came to mind
Is there any prerequisites that need to be installed for the nagios Agent to work correctly ?
Is there any prerequisites that need to be installed for the nagios Agent to work correctly ?
Re: check_nrpe!check_cpu failing on new CentOS8 Server
Did you follow the document below when installing the Linux agent on your CentOS 8 machine?
https://assets.nagios.com/downloads/nag ... _Agent.pdf
Example:
On the client
On the server
Can you post the nrpe.cfg and common.cfg files from the client on the forum?
Also, run the following commands on the Nagios XI server from the command line, and show the output:
https://assets.nagios.com/downloads/nag ... _Agent.pdf
I didn't have any issues with installing the agent on CentOS 8. The installer script should take care of prerequisites. Having said that, I would like to mention that the command that is created is "check_cpu_stats", not "check_cpu". It is added to the common.cfg file.Is there any prerequisites that need to be installed for the nagios Agent to work correctly ?
Example:
On the client
Code: Select all
command[check_cpu_stats]=/usr/local/nagios/libexec/check_cpu_stats.sh $ARG1$Code: Select all
[root@main-nagios-xi ~]# /usr/local/nagios/libexec/check_nrpe -u -H 192.168.x.x -t 60 -c check_cpu_stats -a '-w 85 -c 95'
CPU STATISTICS OK: user=0.00% system=0.20% iowait=0.00% idle=99.80% | user=0.0% system=0.0% iowait=0.0%;85;95 idle=99.80%Also, run the following commands on the Nagios XI server from the command line, and show the output:
Code: Select all
ip addr
/usr/local/nagios/libexec/check_nrpe -H dwylbopsndbx14
/usr/local/nagios/libexec/check_nrpe -H <ip address of dwylbopsndbx14>
/usr/local/nagios/libexec/check_nrpe -H <ip address of dwylbopsndbx14> -t 60 -c check_cpu_stats -a '-w 85 -c 95'Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_nrpe!check_cpu failing on new CentOS8 Server
Hi
Sorry turns out the test system I have been given is a Red Hat 8 and not a CentOS8
The previous systems was CentOS8 but I cannot modify that system
I have done a search for common.cfg but no files where found on the system
So I got a test system and uninstalled the version of Nagios Agent
and then followed the link above to download and do a install
But when I run the ./fullinstall command I get the following message
[root@dwylbopsndbx19 linux-nrpe-agent]# ./fullinstall
RedHatEnterprise is not currently supported. Please use either Red Hat, CentOS, Oracle Linux, CloudLinux, SUSE Enterprise, OpenSUSE, Ubuntu, or Debian.
[root@dwylbopsndbx19 linux-nrpe-agent]#
[root@dwylbopsndbx19 linux-nrpe-agent]# lsb_release -i -r
Distributor ID: RedHatEnterprise
Release: 8.1
The Linux team install the agent via puppet code but when I reinstalled the agent I did get the following message
Notice: /Stage[main]/Opnagios::Profile::Nagios_agent/Package[nrpe]/ensure: created
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install nagios-plugins-lcgdm-common' returned 1:
Error: /Stage[main]/Opnagios::Profile::Nagios_agent/Package[nagios-plugins-lcgdm-common]/ensure: change from purged to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install nagios-plugins-lcgdm-common' returned 1:
Thanks
Sorry turns out the test system I have been given is a Red Hat 8 and not a CentOS8
The previous systems was CentOS8 but I cannot modify that system
I have done a search for common.cfg but no files where found on the system
So I got a test system and uninstalled the version of Nagios Agent
and then followed the link above to download and do a install
But when I run the ./fullinstall command I get the following message
[root@dwylbopsndbx19 linux-nrpe-agent]# ./fullinstall
RedHatEnterprise is not currently supported. Please use either Red Hat, CentOS, Oracle Linux, CloudLinux, SUSE Enterprise, OpenSUSE, Ubuntu, or Debian.
[root@dwylbopsndbx19 linux-nrpe-agent]#
[root@dwylbopsndbx19 linux-nrpe-agent]# lsb_release -i -r
Distributor ID: RedHatEnterprise
Release: 8.1
The Linux team install the agent via puppet code but when I reinstalled the agent I did get the following message
Notice: /Stage[main]/Opnagios::Profile::Nagios_agent/Package[nrpe]/ensure: created
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install nagios-plugins-lcgdm-common' returned 1:
Error: /Stage[main]/Opnagios::Profile::Nagios_agent/Package[nagios-plugins-lcgdm-common]/ensure: change from purged to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install nagios-plugins-lcgdm-common' returned 1:
Thanks
Re: check_nrpe!check_cpu failing on new CentOS8 Server
I think this is a bug in our installer, as it checks for the output of "lsb_release -si" first, but then the "RedHatEnterprise" option is not included as a supported distro... I didn't have "lsb_release" on my test RHEL 8 system, so the installer worked for me. Anyway, I will be notifying our developers of the issue. Meanwhile, you can modify the "fullinstall" script by changing line 87 from this:So I got a test system and uninstalled the version of Nagios Agent
and then followed the link above to download and do a install
But when I run the ./fullinstall command I get the following message
[root@dwylbopsndbx19 linux-nrpe-agent]# ./fullinstall
RedHatEnterprise is not currently supported. Please use either Red Hat, CentOS, Oracle Linux, CloudLinux, SUSE Enterprise, OpenSUSE, Ubuntu, or Debian.
Code: Select all
if [ "$distro" == "CentOS" ] || [ "$distro" == "RedHatEnterpriseServer" ]; thenCode: Select all
if [ "$distro" == "CentOS" ] || [ "$distro" == "RedHatEnterpriseServer" ] || [ "$distro" == "RedHatEnterprise" ]; thenCode: Select all
dnf group install "Development Tools"Code: Select all
[root@TEST_XI_RHEL_8 linux-nrpe-agent]# yum repolist
Updating Subscription Management repositories.
Last metadata expiration check: 0:11:24 ago on Thu 09 Apr 2020 12:56:47 PM EDT.
repo id repo name status
*epel Extra Packages for Enterprise Linux 8 - x86_64 5,219
*epel-modular Extra Packages for Enterprise Linux Modular 8 - x86_64 0
rhel-8-for-x86_64-appstream-rpms Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) 8,820
rhel-8-for-x86_64-baseos-rpms Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) 3,801This is out of scope of Nagios support. You would need to remove all of the custom packages installed by puppet and try our official installer.The Linux team install the agent via puppet code but when I reinstalled the agent I did get the following message
Notice: /Stage[main]/Opnagios::Profile::Nagios_agent/Package[nrpe]/ensure: created
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install nagios-plugins-lcgdm-common' returned 1:
Error: /Stage[main]/Opnagios::Profile::Nagios_agent/Package[nagios-plugins-lcgdm-common]/ensure: change from purged to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install nagios-plugins-lcgdm-common' returned 1:
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_nrpe!check_cpu failing on new CentOS8 Server
Hi
I have just edited the fullinstall script and added the line you mentioned
But now when I run the Fullinstall script I got the following message
Nagios Linux Agent Installation Log
===================================
DATE: Wed Apr 15 03:54:15 EDT 2020
DISTRO INFO:
RedHatEnterprise
8.1
x86_64
Configuring Repos...
Repos configured OK
Installing prerequisites...
Prerequisites installed OK
Adding users and groups...
useradd: user 'nagios' already exists
groupadd: group 'nagios' already exists
useradd: user 'nagios' already exists
Users and groups added OK
/etc/services updated
Firewall rules updated OK
SUB
NAGIOSPLUGINS
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to disable maintainer-specific portions of Makefiles... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/tmp/linux-nrpe-agent/subcomponents/nagiosplugins/nagios-plugins-2.2.1':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
real 0m7.385s
user 0m0.136s
sys 0m0.150s
make: *** No rule to make target 'clean'. Stop.
real 0m0.003s
user 0m0.001s
sys 0m0.002s
make: *** No targets specified and no makefile found. Stop.
real 0m0.003s
user 0m0.003s
sys 0m0.000s
make: *** No rule to make target 'install'. Stop.
real 0m0.003s
user 0m0.001s
sys 0m0.001s
real 0m7.840s
user 0m0.225s
sys 0m0.287s
Subcomponents installation failed - exiting
Thanks
I have just edited the fullinstall script and added the line you mentioned
But now when I run the Fullinstall script I got the following message
Nagios Linux Agent Installation Log
===================================
DATE: Wed Apr 15 03:54:15 EDT 2020
DISTRO INFO:
RedHatEnterprise
8.1
x86_64
Configuring Repos...
Repos configured OK
Installing prerequisites...
Prerequisites installed OK
Adding users and groups...
useradd: user 'nagios' already exists
groupadd: group 'nagios' already exists
useradd: user 'nagios' already exists
Users and groups added OK
/etc/services updated
Firewall rules updated OK
SUB
NAGIOSPLUGINS
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to disable maintainer-specific portions of Makefiles... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/tmp/linux-nrpe-agent/subcomponents/nagiosplugins/nagios-plugins-2.2.1':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
real 0m7.385s
user 0m0.136s
sys 0m0.150s
make: *** No rule to make target 'clean'. Stop.
real 0m0.003s
user 0m0.001s
sys 0m0.002s
make: *** No targets specified and no makefile found. Stop.
real 0m0.003s
user 0m0.003s
sys 0m0.000s
make: *** No rule to make target 'install'. Stop.
real 0m0.003s
user 0m0.001s
sys 0m0.001s
real 0m7.840s
user 0m0.225s
sys 0m0.287s
Subcomponents installation failed - exiting
Thanks
Re: check_nrpe!check_cpu failing on new CentOS8 Server
The config.log file basically gives the same message
## ----------- ##
## Core tests. ##
## ----------- ##
configure
checking for a BSD-compatible install
configure
result: /usr/bin/install -c
configure
checking whether build environment is sane
configure
result: yes
configure
checking for a thread-safe mkdir -p
configure
result: /usr/bin/mkdir -p
configure
checking for gawk
configure
found /usr/bin/gawk
configure
result: gawk
configure
checking whether make sets $(MAKE)
configure
result: yes
configure
checking whether to disable maintainer-specific portions of Makefiles
configure
result: yes
configure
checking build system type
configure
result: x86_64-unknown-linux-gnu
configure
checking host system type
configure
result: x86_64-unknown-linux-gnu
configure
checking for gcc
configure
result: no
configure
checking for cc
configure
result: no
configure:4036: checking for cl.exe
configure:4066: result: no
configure:4090: error: in `/tmp/linux-nrpe-agent/subcomponents/nagiosplugins/nagios-plugins-2.2.1':
configure:4093: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
## ----------- ##
## Core tests. ##
## ----------- ##
configure
configure
configure
configure
configure
configure
configure
configure
configure
configure
configure
configure
configure
configure
configure
configure
configure
configure
configure
configure
configure
configure:4036: checking for cl.exe
configure:4066: result: no
configure:4090: error: in `/tmp/linux-nrpe-agent/subcomponents/nagiosplugins/nagios-plugins-2.2.1':
configure:4093: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
Re: check_nrpe!check_cpu failing on new CentOS8 Server
Did you install the dev tools, prior to running the installer script?
Code: Select all
dnf group install "Development Tools"Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_nrpe!check_cpu failing on new CentOS8 Server
Hi
I am still working on this agent install but can you tell me besides the installing the Dev Tools
and modifying the script is there anything else that should be installed ?
What are the packages (rpms) require to configure monitory on Redhat8 servers
Thanks
I am still working on this agent install but can you tell me besides the installing the Dev Tools
and modifying the script is there anything else that should be installed ?
What are the packages (rpms) require to configure monitory on Redhat8 servers
Thanks
Re: check_nrpe!check_cpu failing on new CentOS8 Server
You don't need anything else. Once the dev tools is installed, you should have a compiler, and the Linux agent should install. The Linux agent consists of NRPE daemon and Nagios pluings. This is all you need to start monitoring your client machine.
Be sure to check out our Knowledgebase for helpful articles and solutions!