Page 3 of 4

Re: Error message using NRPE

Posted: Fri Jan 05, 2018 11:24 am
by npolovenko
@DOkuwa, Please delete the comma between 127.0.0.1, 10.241.11.236. It should look like this:

Code: Select all

only_from       = 127.0.0.1 10.241.11.236 
After that please restart nrpe with:

Code: Select all

service xinetd restart

Re: Error message using NRPE

Posted: Fri Jan 05, 2018 11:25 am
by DOkuwa

Code: Select all

[root@rhes7-0 libexec]# find / -name npre
[root@rhes7-0 libexec]# find / -name nagios
/etc/selinux/targeted/active/modules/100/nagios
/usr/lib/nagios
/usr/lib64/nagios
/usr/local/nagios
[root@rhes7-0 libexec]#

Re: Error message using NRPE

Posted: Fri Jan 05, 2018 11:51 am
by dwhitfield
Did you run find / -name nrpe on the REMOTE server (that is, the one you are monitoring)? It's pretty clear you don't have NRPE installed on whatever server you ran that on...however, you sent us a file called nrpe before which suggests it should have picked up something.

Re: Error message using NRPE

Posted: Fri Jan 05, 2018 12:03 pm
by DOkuwa

Code: Select all

[root@rhes7-0 libexec]# find / -name nrpe
/tmp/linux-nrpe-agent/subcomponents/nrpe
/tmp/linux-nrpe-agent/subcomponents/nrpe/mods/cfg/nrpe
/tmp/linux-nrpe-agent/subcomponents/nrpe/nrpe-3.2.1/src/nrpe
/etc/xinetd.d/nrpe
/usr/local/nagios/bin/nrpe
/usr/local/nagios/etc/nrpe
I also have changed this to
only_from       = 127.0.0.1 10.241.11.236 and ran service xinetd restart
also attaching nrpe.cfg

Re: Error message using NRPE

Posted: Fri Jan 05, 2018 12:18 pm
by dwhitfield
I would like to request that you stop giving us .docx files. A simple text file will suffice. That said, you still have the comma in the docx file. Can you just comment out that only_from line completely for testing and then run service xinetd restart?

Re: Error message using NRPE

Posted: Fri Jan 05, 2018 12:29 pm
by DOkuwa
still the same after the change
not solved yet

Re: Error message using NRPE

Posted: Fri Jan 05, 2018 12:32 pm
by DOkuwa
Also I don't know why we are having this lsof command

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: Fri Jan 05, 2018 12:37 pm
by dwhitfield
On the remote host, what is the output of

Code: Select all

sestatus
grep nag /etc/passwd
grep nag /etc/group
cat /proc/mounts
?

Also, please post your /etc/sudoers from the remote host.

If you are a customer, at this point I would highly advise putting in a ticket at https://support.nagios.com/tickets/ . If you do not have access to the ticketing system, please email [email protected]

Re: Error message using NRPE

Posted: Mon Jan 08, 2018 3:56 am
by DOkuwa
results of the commands

Code: Select all

[root@rhes7-0 dokuwa]# sestatus
SELinux status:                 disabled
[root@rhes7-0 dokuwa]# grep nag /etc/passwd
nagios:x:993:992::/var/spool/nagios:/bin/bash
systemd-network:x:192:192:systemd Network Management:/:/sbin/nologin
[root@rhes7-0 dokuwa]# grep nag /etc/group
nagios:x:992:centreon-engine,centreon-broker,apache,nagios
centreon-broker:x:990:centreon,nagios,centreon-engine,apache
apache:x:48:nagios,centreon
centreon-engine:x:987:centreon-broker,apache,nagios,centreon
nagcmd:x:1002:nagios
[root@rhes7-0 dokuwa]# cat /proc/mounts
rootfs / rootfs rw 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
devtmpfs /dev devtmpfs rw,nosuid,size=3994224k,nr_inodes=998556,mode=755 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,nodev,mode=755 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct,cpu 0 0
cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0
cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_prio,net_cls 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
/dev/mapper/vg0-ROOT / ext3 rw,relatime,data=ordered 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=11303 0 0
mqueue /dev/mqueue mqueue rw,relatime 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
/dev/sda1 /boot ext3 rw,relatime,data=ordered 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
[root@rhes7-0 dokuwa]# [root@rhes7-0 dokuwa]# sestatus
bash: [root@rhes7-0: command not found
devtmpfs /dev devtmpfs rw,nosuid,size=3994224k,nr_inodes=998556,mode=755 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
 

Re: Error message using NRPE

Posted: Mon Jan 08, 2018 6:45 am
by DOkuwa
it is now working
Halleluya
I modified the nrpe file to allow this
only_from = 127.0.0.1 10.241.11.236
and also the nrpe.cfg
allowed_hosts=127.0.0.1 10.241.11.236
and then rebooted the box
I am extremely happy and grateful with your help
and by the time i have finished troubleshooting on Nagios :) :) :D
I will be a GURU like you guys
please close case