Page 1 of 1
Can't start NRPE service CentOS
Posted: Mon Mar 19, 2012 3:48 pm
by jbruyet
Hey all, I have Nagios up and running and monitoring my Windows machines. Now I'm trying to get it to monitor my Linux servers and I've hit a bit of a snag. I downloaded nrpe-2.12.tar.gz and installed it, downloaded nagios-plugins-1.4.14.tar.gz and installed it, but when I try to start the service I get "nrpe: unrecognized service." When I run /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d I get a line feed and nothing else (I've grepped services and there's no nrpe). I've tried it with -i too but no joy. The only thing I can figure is that I messed up the install, but there weren't any errors. Anyone have any ideas?
Thanks,
Joe B
Re: Can't start NRPE service CentOS
Posted: Mon Mar 19, 2012 4:46 pm
by lmiltchev
What do you see, when you run:
Code: Select all
# ls /usr/local/nagios/libexec | grep nrpe
Re: Can't start NRPE service CentOS
Posted: Mon Mar 19, 2012 6:31 pm
by jbruyet
Hi lmiltchev, here's what I see when I run your command:
[root@CentOS54 jobee]# ls /usr/local/nagios/libexec | grep nrpe
check_nrpe
[root@CentOS54 jobee]#
FWIW here's the file info:
-rwxrwxr-x 1 nagios nagios 62313 Feb 16 09:02 check_nrpe
Thanks,
Joe B
Re: Can't start NRPE service CentOS
Posted: Tue Mar 20, 2012 9:53 am
by mguthrie
Code: Select all
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
This by itself launches a daemon, so it was actually running while you were seeing the empty line feed. If you ran:
Code: Select all
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d &
You'll fork the process to the background. Do you have an init script in /etc/init.d/nrpe? If so you could just run:
Re: Can't start NRPE service CentOS
Posted: Tue Mar 20, 2012 2:59 pm
by jbruyet
Hi mguthrie,
mguthrie wrote:Code: Select all
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
This by itself launches a daemon, so it was actually running while you were seeing the empty line feed.
I'm not new to Linux but I'm not up to guru status yet either. Even so, shouldn't I have been able to ps aux | grep nrpe and find nrpe running?
If you ran:
Code: Select all
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d &
You'll fork the process to the background.
Ok, I ran that command, grepped ps and found nrpe running.
Do you have an init script in /etc/init.d/nrpe? If so you could just run:
I have an init script now. I actually put the "&" command in the script so grepping can tell me if it's working.
Thanks for the help,
Joe B