Page 2 of 4

Re: Error message using NRPE

Posted: Tue Jan 02, 2018 10:41 am
by DOkuwa
This is the common.cfg as expected in the attachment
thanks

Re: Error message using NRPE

Posted: Tue Jan 02, 2018 6:05 pm
by dwhitfield
You don't have a check_yum in your libexec output, so that's probably why the check_yum isn't working.

Did you run chown -r nagios.nagios /usr/local/nagios/libexec on the remote host as I suggested you do before? Was there any improvement? I'd expect you to still have some problems, but that might clear up some.

Please run service xinetd restart and then run ps -aef | grep nrpe again.

Re: Error message using NRPE

Posted: Wed Jan 03, 2018 7:14 am
by DOkuwa
Done that and still have the same issue

Code: Select all

[root@rhes7-0 libexec]# ls -al
total 7816
drwxrwxr-x 2 nagios nagios   4096 Dec 28 14:38 .
drwxr-xr-x 8 nagios nagios   4096 Dec 28 14:37 ..
-rwxr-xr-x 1 nagios nagios 210768 Dec 28 14:37 check_apt
-rwxr-xr-x 1 nagios nagios   6897 Dec 28 14:38 check_asterisk.pl
-rwxr-xr-x 1 nagios nagios   1978 Dec 28 14:38 check_asterisk_sip_peers.sh
-rwxr-xr-x 1 nagios nagios   2342 Dec 28 14:37 check_breeze
-rwxr-xr-x 1 nagios nagios 214760 Dec 28 14:37 check_by_ssh
lrwxrwxrwx 1 nagios nagios      9 Dec 28 14:37 check_clamd -> check_tcp
-rwxr-xr-x 1 nagios nagios 163136 Dec 28 14:37 check_cluster
-rwxr-xr-x 1 nagios nagios   5582 Dec 28 14:38 check_cpu_stats.sh
-rwxr-xr-x 1 nagios nagios 211680 Dec 28 14:37 check_dhcp
-rwxr-xr-x 1 nagios nagios 222848 Dec 28 14:37 check_dig
-rwxr-xr-x 1 nagios nagios 227408 Dec 28 14:37 check_disk
-rwxr-xr-x 1 nagios nagios   9465 Dec 28 14:37 check_disk_smb
-rwxr-xr-x 1 nagios nagios 230760 Dec 28 14:37 check_dns
-rwxr-xr-x 1 nagios nagios 127224 Dec 28 14:37 check_dummy
-rwxr-xr-x 1 nagios nagios   3856 Dec 28 14:37 check_file_age
-rwxr-xr-x 1 nagios nagios   6500 Dec 28 14:37 check_flexlm
lrwxrwxrwx 1 nagios nagios      9 Dec 28 14:37 check_ftp -> check_tcp
-rwxr-xr-x 1 nagios nagios 209616 Dec 28 14:37 check_hpjd
-rwxr-xr-x 1 nagios nagios 375112 Dec 28 14:37 check_http
-rwxr-xr-x 1 nagios nagios 227376 Dec 28 14:37 check_icmp
-rwxr-xr-x 1 nagios nagios 170016 Dec 28 14:37 check_ide_smart
-rwxr-xr-x 1 nagios nagios  15271 Dec 28 14:37 check_ifoperstatus
-rwxr-xr-x 1 nagios nagios  13419 Dec 28 14:37 check_ifstatus
lrwxrwxrwx 1 nagios nagios      9 Dec 28 14:37 check_imap -> check_tcp
-rwxr-xr-x 1 nagios nagios    972 Dec 28 14:38 check_init_service
-rwxr-xr-x 1 nagios nagios   6980 Dec 28 14:37 check_ircd
lrwxrwxrwx 1 nagios nagios      9 Dec 28 14:37 check_jabber -> check_tcp
-rwxr-xr-x 1 nagios nagios 187800 Dec 28 14:37 check_load
-rwxr-xr-x 1 nagios nagios   6669 Dec 28 14:37 check_log
-rwxr-xr-x 1 nagios nagios  22729 Dec 28 14:37 check_mailq
-rwxr-xr-x 1 nagios nagios 173328 Dec 28 14:37 check_mrtg
-rwxr-xr-x 1 nagios nagios 170544 Dec 28 14:37 check_mrtgtraf
-rwxr-xr-x 1 nagios nagios 186928 Dec 28 14:37 check_nagios
-rwxr-xr-x 1 nagios nagios  25602 Dec 28 14:38 check_netstat.pl
lrwxrwxrwx 1 nagios nagios      9 Dec 28 14:37 check_nntp -> check_tcp
lrwxrwxrwx 1 nagios nagios      9 Dec 28 14:37 check_nntps -> check_tcp
-rwxr-xr-x 1 nagios nagios 144720 Dec 28 14:38 check_nrpe
-rwxr-xr-x 1 nagios nagios 219920 Dec 28 14:37 check_nt
-rwxr-xr-x 1 nagios nagios 218576 Dec 28 14:37 check_ntp
-rwxr-xr-x 1 nagios nagios 208320 Dec 28 14:37 check_ntp_peer
-rwxr-xr-x 1 nagios nagios 203216 Dec 28 14:37 check_ntp_time
-rwxr-xr-x 1 nagios nagios 250264 Dec 28 14:37 check_nwstat
-rwxr-xr-x 1 nagios nagios   3259 Dec 28 14:38 check_open_files.pl
-rwxr-xr-x 1 nagios nagios   9457 Dec 28 14:37 check_oracle
-rwxr-xr-x 1 nagios nagios 193160 Dec 28 14:37 check_overcr
-rwxrwxrwx 1 nagios nagios 223376 Dec 28 14:37 check_ping
lrwxrwxrwx 1 nagios nagios      9 Dec 28 14:37 check_pop -> check_tcp
-rwxr-xr-x 1 nagios nagios 224304 Dec 28 14:37 check_procs
-rwxr-xr-x 1 nagios nagios 185688 Dec 28 14:37 check_real
-rwxr-xr-x 1 nagios nagios   9675 Dec 28 14:37 check_rpc
-rwxr-xr-x 1 nagios nagios   1533 Dec 28 14:37 check_sensors
-rwxr-xr-x 1 nagios nagios   2174 Dec 28 14:38 check_services
lrwxrwxrwx 1 nagios nagios      9 Dec 28 14:37 check_simap -> check_tcp
-rwxr-xr-x 1 nagios nagios   7599 Dec 28 14:38 check_sip
-rwxr-xr-x 1 nagios nagios 268896 Dec 28 14:37 check_smtp
-rwxr-xr-x 1 nagios nagios 269904 Dec 28 14:37 check_snmp
lrwxrwxrwx 1 nagios nagios      9 Dec 28 14:37 check_spop -> check_tcp
-rwxr-xr-x 1 nagios nagios 185344 Dec 28 14:37 check_ssh
lrwxrwxrwx 1 nagios nagios      9 Dec 28 14:37 check_ssmtp -> check_tcp
-rwxr-xr-x 1 nagios nagios 166912 Dec 28 14:37 check_swap
-rwxr-xr-x 1 nagios nagios 252960 Dec 28 14:37 check_tcp
-rwxr-xr-x 1 nagios nagios 187064 Dec 28 14:37 check_time
lrwxrwxrwx 1 nagios nagios      9 Dec 28 14:37 check_udp -> check_tcp
-rwxr-xr-x 1 nagios nagios 199560 Dec 28 14:37 check_ups
-rwxr-xr-x 1 nagios nagios 163400 Dec 28 14:37 check_uptime
-rwxr-xr-x 1 nagios nagios 157760 Dec 28 14:37 check_users
-rwxr-xr-x 1 nagios nagios   3028 Dec 28 14:37 check_wave
-rwxr-xr-x 1 nagios nagios    710 Dec 28 14:38 check_yum
-rwxr-xr-x 1 nagios nagios   3435 Dec 28 14:38 custom_check_mem
-rwxr-xr-x 1 nagios nagios    915 Dec 28 14:38 custom_check_procs
-rwxr-xr-x 1 nagios nagios   4176 Dec 28 14:38 nagisk.pl
-rwxr-xr-x 1 nagios nagios 157888 Dec 28 14:37 negate
-rwxr-xr-x 1 nagios nagios 151424 Dec 28 14:37 urlize
-rwxr-xr-x 1 nagios nagios   1933 Dec 28 14:37 utils.pm
-rwxr-xr-x 1 nagios nagios   2791 Dec 28 14:37 utils.sh

Re: Error message using NRPE

Posted: Wed Jan 03, 2018 7:16 am
by DOkuwa
Also

Code: Select all

ps -aef | grep nrpe
root     29302 29129  0 08:58 pts/0    00:00:00 grep --color=auto nrpe

Re: Error message using NRPE

Posted: Wed Jan 03, 2018 12:42 pm
by dwhitfield
I was doing some testing and was having issues. I reinstalled the agent (without removing anything first) and that resolved my issues: https://assets.nagios.com/downloads/nag ... _Agent.pdf . Make sure you do this on the remote host.

There is a large caveat that you will need to back up any custom commands in your nrpe. It doesn't look like OP has any, but leaving that caveat for anyone else that might find this thread later.

Once you've installed the new agent, please resend the common.cfg, nrpe.cfg, and /etc/xinetd.d/nrpe so we can verify the install went through correctly.

The install should restart xinetd, but in case there is no change, run service xinetd restart. If that does not resolve the issue, run grep nrpe /var/log/messages. If there's still nothing showing up there, you may need to speak with your Linux admin about where your system messages are stored.

Re: Error message using NRPE

Posted: Thu Jan 04, 2018 5:13 am
by DOkuwa
reinstalled the nrpe on the remote server and got this message

Code: Select all

[root@rhes7-0 linux-nrpe-agent]# ./fullinstall
============================
Nagios Linux Agent Installer
============================

This script will install the Nagios Linux Agent by executing all necessary
sub-scripts.

IMPORTANT: This script should only be used on a clean installed system:

   RedHat Enterprise, CentOS, Fedora, Cloud Linux or Oracle
   OpenSUSE or SUSE Enterprise
   Ubuntu or Debian

Do NOT use this on a system running any other distro or that
does not allow additional package installation.

Do you want to continue? [Y/n] Y
Proceeding with installation...
Running './0-repos'...
Repos already configured - exiting.
RESULT=0
Running './1-prereqs'...
Prereqs already installed - skipping...
RESULT=0
Running './2-usersgroups'...
Users/groups already configured - skipping.
RESULT=0
Running './3-services'...
/etc/services already updated - skipping.
RESULT=0
Running './4-firewall'...
Firewall rules already configured - skipping.
RESULT=0
Running './A-subcomponents'...
Subcomponents already configured - skipping.
RESULT=0

##########################################################
###                                                    ###
###    Nagios XI Linux Agent Installation Complete!    ###
###                                                    ###
##########################################################

If you experience any problems, please attach the file install.log that was just created to any support requests.


NOTICE:
Your firewall configuration was skipped
You need to manually open ports 5666 for TCP traffic


I checked the iptables and could not see anything wrong and also attaching the install logs

Code: Select all

 [root@rhes7-0 linux-nrpe-agent]# iptables -L | grep nrpe
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:nrpe
[root@rhes7-0 linux-nrpe-agent]# lsof -i :5666
COMMAND   PID USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
xinetd  30608 root    5u  IPv6 22460552      0t0  TCP *:nrpe (LISTEN)

Re: Error message using NRPE

Posted: Thu Jan 04, 2018 5:21 am
by DOkuwa
just looking at the lsof command I don't why it is IPv6 instead of 4

Code: Select all

COMMAND   PID USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
xinetd  30608 root    5u [color=#80BF00] IPv6 [/color]22460552      0t0  TCP *:nrpe (LISTEN

Re: Error message using NRPE

Posted: Thu Jan 04, 2018 1:59 pm
by npolovenko
@DOkuwa, Please upload the following file from the remote server where you installed the nrpe agent:

Code: Select all

/etc/xinetd.d/nrpe
Thank you.

Re: Error message using NRPE

Posted: Fri Jan 05, 2018 5:29 am
by DOkuwa
I am sending the nrpe as requested an attachment

Re: Error message using NRPE

Posted: Fri Jan 05, 2018 11:21 am
by dwhitfield
On the remote host, what's the output of find / -name npre and find / -name nagios?