Can't start NRPE service CentOS

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Can't start NRPE service CentOS

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Can't start NRPE service CentOS

Post by lmiltchev »

What do you see, when you run:

Code: Select all

# ls /usr/local/nagios/libexec | grep nrpe
Be sure to check out our Knowledgebase for helpful articles and solutions!
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Can't start NRPE service CentOS

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Can't start NRPE service CentOS

Post 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:

Code: Select all

/etc/init.d/nrpe start  
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Can't start NRPE service CentOS

Post 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:

Code: Select all

/etc/init.d/nrpe start  
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
Locked