Page 1 of 2
NRPE
Posted: Fri Sep 26, 2014 11:55 am
by spiderpig82
hi,
i installed nrpe plugin on a centos server, configure the nrpe.cfg.
but after that i have to restart the nrpe service, but it always fails to restart. It wont stop.
(i can not restart the server, so that is not in the picture)
any ideas?
thanx
Re: NRPE
Posted: Fri Sep 26, 2014 12:02 pm
by tmcdonald
What error messages are you getting when trying to restart the service? What command are you using to restart it? Can you show us the result of running the command and the output that follows?
Re: NRPE
Posted: Fri Sep 26, 2014 12:12 pm
by spiderpig82
hi,
i have tried "root: /etc/init.d/nrpe restart" and "service nrpe restart"
shuttind down nrpe: [FAILED]
Starting nrpe: [OK]
in /var/log/message i get these messages on the linux client that i'm trying to enable the nrpe (172.16.250.60 is the nagios server)
xinetd[1538]: START: nrpe pid=4229 from=::ffff:172.16.250.60
xinetd[1538]: EXIT: nrpe status=0 pid=4229 duration=0(sec)
xinetd[1538]: START: nrpe pid=4231 from=::ffff:172.16.250.60
xinetd[1538]: START: nrpe pid=4232 from=::ffff:172.16.250.60
xinetd[1538]: EXIT: nrpe status=0 pid=4231 duration=0(sec)
xinetd[1538]: START: nrpe pid=4233 from=::ffff:172.16.250.60
nrpe[4232]: Error: Request contained command arguments!
nrpe[4232]: Client request was invalid, bailing out...
xinetd[1538]: EXIT: nrpe status=0 pid=4232 duration=0(sec)
nrpe[4233]: Error: Request contained command arguments!
nrpe[4233]: Client request was invalid, bailing out...
xinetd[1538]: EXIT: nrpe status=0 pid=4233 duration=0(sec)
xinetd[1538]: START: nrpe pid=4234 from=::ffff:172.16.250.60
xinetd[1538]: START: nrpe pid=4235 from=::ffff:172.16.250.60
xinetd[1538]: START: nrpe pid=4236 from=::ffff:172.16.250.60
xinetd[1538]: EXIT: nrpe status=0 pid=4234 duration=0(sec)
xinetd[1538]: EXIT: nrpe status=0 pid=4235 duration=0(sec)
xinetd[1538]: EXIT: nrpe status=0 pid=4236 duration=0(sec)
xinetd[1538]: START: nrpe pid=4240 from=::ffff:172.16.250.60
nrpe[4240]: Error: Request contained command arguments!
nrpe[4240]: Client request was invalid, bailing out...
xinetd[1538]: EXIT: nrpe status=0 pid=4240 duration=0(sec)
Re: NRPE
Posted: Fri Sep 26, 2014 12:30 pm
by lmiltchev
Run the following commands and show us the output:
Code: Select all
ps axuw | grep nrpe
netstat -at | grep nrpe
ls -la /etc/init.d/nrpe
For the "nrpe[4232]: Error: Request contained command arguments!" error, change the following line in the nrpe.cfg from this:
to this:
You still need to restart nrpe so that changes can take effect.
Re: NRPE
Posted: Tue Sep 30, 2014 10:08 am
by spiderpig82
hi,
here's the info:
ps axuw | grep nrpe
root 12325 0.0 0.0 103252 844 pts/0 S+ 15:01 0:00 grep nrpe
netstat -at | grep nrpe
tcp 0 0 *:nrpe *:* LISTEN
ls -la /etc/init.d/nrpe
-rwxr-xr-x 1 root root 1583 May 1 01:28 /etc/init.d/nrpe
Re: NRPE
Posted: Tue Sep 30, 2014 10:19 am
by lmiltchev
Can you restart nrpe by running the following command?
Did you set "dont_blame_nrpe=1" in the nrpe.cfg?
Re: NRPE
Posted: Tue Sep 30, 2014 10:50 am
by spiderpig82
yes i can restart xienetd service , and set the dont_blame_nrpe=1
[root@linux etc]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@linux etc]# service nrpe restart
Shutting down nrpe: [FAILED]
Starting nrpe: [ OK ]
[root@linux etc]#
Re: NRPE
Posted: Tue Sep 30, 2014 11:02 am
by slansing
How did you install NRPE? Compiling from source, or our linux-agent tarball? The reason I ask is you have an actual NRPE service, which means you are likely not using xinetd to control it. Do you have an NRPE file under:
Re: NRPE
Posted: Wed Oct 01, 2014 3:36 am
by spiderpig82
yes i did install the nrpe, via tarball if i remember right.
was it wrong move to install the nrpe? can i just use the xienetd service?
(here is the nrpe file in /etc/xinetd.d/nrpe )
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 127.0.0.1 (and nagios servers ip)
}
Re: NRPE
Posted: Wed Oct 01, 2014 10:43 am
by spiderpig82
should i remove the nrpe service?