Error: Could not create external command file '/usr/local/nagios/var/<br>
> rw/nagios.cmd' as named pipe: (2) -> No such file or directory.  If<br>
> this file already exists and you are sure that another copy of<br>
> Nagios is not running, you should delete this file.<br>
> Bailing out due to errors encountered while trying to initialize the<br>
> external command file... (PID=31661)<br><br>The above error dissapeared as soon i created the rw directory inside /usr/local/nagios/var<br><br>This time i could see nagios as a proces running:<br><br>[root@DELL8B81Y11 subsys]# ps -ef | grep nagios<br>
nagios    1992     1  0 09:47 ?        00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg<br> <br>But when i type <a href="http://localhost/nagios/">http://localhost/nagios/</a> i get the nagios open up page but then when i click host detail i see<br>
<br><pre><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><br><html><head><br><title>500 Internal Server Error</title><br></head><body><br><h1>Internal Server Error</h1><br>
<p>The server encountered an internal error or<br>misconfiguration and was unable to complete<br>your request.</p><br><p>Please contact the server administrator,<br> root@localhost and inform them of the time the error occurred,<br>
and anything you might have done that may have<br>caused the error.</p><br><p>More information about this error may be available<br>in the server error log.</p><br><hr><br><address>Apache/2.2.3 (Red Hat) Server at localhost Port 80</address><br>
</body></html><br><br><br><br></pre>I also checked the /var/log/httpd/error_log :<br><br>[Thu Mar 19 09:49:05 2009] [error] [client 127.0.0.1] Premature end of script headers: status.cgi, referer: <a href="http://localhost/nagios/side.html">http://localhost/nagios/side.html</a><br>
[Thu Mar 19 09:49:40 2009] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/<br>[Thu Mar 19 09:50:40 2009] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/<br>
[Thu Mar 19 09:51:19 2009] [error] [client 127.0.0.1] (13)Permission denied: exec of '/usr/local/nagios/sbin/status.cgi' failed, referer: <a href="http://localhost/na">http://localhost/na</a><br>gios/side.html<br>
[Thu Mar 19 09:51:19 2009] [error] [client 127.0.0.1] Premature end of script headers: status.cgi, referer: <a href="http://localhost/nagios/side.html">http://localhost/nagios/side.html</a><br>[Thu Mar 19 09:51:21 2009] [error] [client 127.0.0.1] (13)Permission denied: exec of '/usr/local/nagios/sbin/status.cgi' failed, referer: <a href="http://localhost/na">http://localhost/na</a><br>
gios/side.html<br>[Thu Mar 19 09:51:21 2009] [error] [client 127.0.0.1] Premature end of script headers: status.cgi, referer: <a href="http://localhost/nagios/side.html">http://localhost/nagios/side.html</a><br>[Thu Mar 19 09:51:40 2009] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/<br>
[Thu Mar 19 09:52:40 2009] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/<br>[Thu Mar 19 09:53:40 2009] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/<br>
<br>Thanks you for your help ,<br><br><br><div class="gmail_quote">On Wed, Mar 18, 2009 at 5:26 PM,  <span dir="ltr"><<a href="mailto:nagios-users-request@lists.sourceforge.net">nagios-users-request@lists.sourceforge.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Send Nagios-users mailing list submissions to<br>
        <a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:nagios-users-request@lists.sourceforge.net">nagios-users-request@lists.sourceforge.net</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:nagios-users-owner@lists.sourceforge.net">nagios-users-owner@lists.sourceforge.net</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Nagios-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: RESEND: orphaned check, no check results posted, no macro<br>
      expand: solaris 10, new install] (David Dozier)<br>
   2. Re: problem starting nagios (Marc Powell)<br>
   3. Circular Map setup (Albrecht Dre?)<br>
   4. Re: Nagios-SNMP (Jim Avery)<br>
   5. Re: blank perfdata: not parsing macros (Jim Avery)<br>
   6. Re: Circular Map setup (Jim Avery)<br>
   7. Stuck on NRPE for OS X Server (Andrew Davis)<br>
   8. Re: Stuck on NRPE for OS X Server (Andrew Davis)<br>
   9. Re: Stuck on NRPE for OS X Server (Andrew Davis)<br>
  10. Re: Stuck on NRPE for OS X Server (Allan Clark)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 18 Mar 2009 12:17:07 -0400<br>
From: David Dozier <David.Dozier@Sun.COM><br>
Subject: Re: [Nagios-users] RESEND: orphaned check, no check results<br>
        posted, no macro expand: solaris 10, new install]<br>
To: Marc Powell <<a href="mailto:marc@ena.com">marc@ena.com</a>><br>
Cc: Nagios User list <<a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a>><br>
Message-ID: <<a href="mailto:49C11E83.2070209@sun.com">49C11E83.2070209@sun.com</a>><br>
Content-Type: text/plain; format=flowed; charset=ISO-8859-1<br>
<br>
Thanks Marc,<br>
<br>
For the URL:<br>
<br>
I see that the debug_level needs to be set to 2048 to capture macro<br>
expansion.<br>
<br>
Debug_verbosity=2<br>
<br>
I've restarted and will continue troubleshooting.<br>
<br>
David<br>
<br>
<br>
<br>
Marc Powell wrote:<br>
> On Mar 18, 2009, at 10:02 AM, David Dozier wrote:<br>
><br>
><br>
>> All,<br>
>><br>
>> Should I be seeing the following lack of macro expansion in<br>
>> nagios.debug?<br>
>><br>
>> In nagios.debug:<br>
>> ================<br>
>> [] Raw Command Input: $USER1$/check_ping -H $HOSTADDRESS$ -w<br>
>> 3000.0,80%<br>
>> -c 5000.0,100% -p 5<br>
>> [] Expanded Command Output: $USER1$/check_ping -H $HOSTADDRESS$ -w<br>
>> 3000.0,80% -c 5000.0,100% -p 5<br>
>><br>
>> [] Finished reaping 0 check results<br>
>><br>
><br>
> I don't use nagios-3 yet but I believe it might depend on the<br>
> debug_verbosity without looking at the actual code. Here is an example<br>
> where it was shown as expanded after the second loop through MACRO<br>
> PROCESSING -- <a href="http://article.gmane.org/gmane.network.nagios.devel/4737" target="_blank">http://article.gmane.org/gmane.network.nagios.devel/4737</a><br>
><br>
><br>
>> FYI: I set Debugging_output=256, and every  "Expanded Command<br>
>> Output" is<br>
>> not expanded, and every "Reap check results" yeilds 0 check results.<br>
>><br>
><br>
> Did you mean debug_level? is debug_verbosity set to 2?<br>
><br>
> --<br>
> Marc<br>
><br>
><br>
> ------------------------------------------------------------------------------<br>
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are<br>
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and<br>
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development<br>
> software that enables intelligent coding and step-through debugging.<br>
> Download the free 60 day trial. <a href="http://p.sf.net/sfu/www-adobe-com" target="_blank">http://p.sf.net/sfu/www-adobe-com</a><br>
> _______________________________________________<br>
> Nagios-users mailing list<br>
> <a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
> ::: Messages without supporting info will risk being sent to /dev/null<br>
><br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Wed, 18 Mar 2009 12:43:33 -0500<br>
From: Marc Powell <<a href="mailto:marc@ena.com">marc@ena.com</a>><br>
Subject: Re: [Nagios-users] problem starting nagios<br>
To: Nagios User list <<a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a>><br>
Message-ID: <<a href="mailto:2DDE945C-0D20-4664-B5B7-DECE59564050@ena.com">2DDE945C-0D20-4664-B5B7-DECE59564050@ena.com</a>><br>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes<br>
<br>
<br>
Hi Anirudh,<br>
<br>
On Mar 18, 2009, at 12:13 PM, Anirudh Srinivasan wrote:<br>
<br>
> This is what i see when i run this .and to tell you i dint create<br>
> time period which i think is no way related to this problem:<br>
><br>
> Nagios 3.0.6<br>
> Copyright (c) 1999-2008 Ethan Galstad (<a href="http://www.nagios.org" target="_blank">http://www.nagios.org</a>)<br>
> Last Modified: 12-01-2008<br>
> License: GPL<br>
><br>
> Nagios 3.0.6 starting... (PID=31661)<br>
> Local time is Wed Mar 18 12:59:33 EDT 2009<br>
> Error: Template 'generic-host' specified in host definition could<br>
> not be not found (config file '/usr/local/nagios/etc/objects/<br>
> localhost.cfg', starting on line 20)<br>
> Error: Template 'generic-service' specified in service definition<br>
> could not be not found (config file '/usr/local/nagios/etc/objects/<br>
> localhost.cfg', starting on line 64)<br>
><br>
> Error: Could not create external command file '/usr/local/nagios/var/<br>
> rw/nagios.cmd' as named pipe: (2) -> No such file or directory.  If<br>
> this file already exists and you are sure that another copy of<br>
> Nagios is not running, you should delete this file.<br>
> Bailing out due to errors encountered while trying to initialize the<br>
> external command file... (PID=31661)<br>
<br>
<br>
Any Error's will prevent nagios from starting. That's a pretty common<br>
convention for daemons. You must fix the three configuration errors<br>
above before nagios will start.<br>
<br>
For the first two errors, you have host{} and service{} definitions<br>
that reference other definitions named 'generic-host' and 'generic-<br>
service'. They do not exist in a cfg file that you've told nagios to<br>
load. Use grep to find which file they exist in and make sure it's<br>
listed as a cfg_file in nagios.cfg.<br>
<br>
For the last error, nagios has been told to listen for external<br>
commands but is unable to create the 'file' needed to do that under /<br>
usr/local/nagios/var/rw. Does that directory exist and is it owned and<br>
readable/writable by the nagios user? If you installed from source, I<br>
believe the make command to do that is 'make install-commandmode' from<br>
within the nagios source tree, or you can just create the rw directory<br>
(but not the nagios.cmd file) and give it nagios ownership and rwx<br>
permissions.<br>
<br>
--<br>
Marc<br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Wed, 18 Mar 2009 19:16:13 +0100<br>
From: Albrecht Dre? <<a href="mailto:albrecht.dress@arcor.de">albrecht.dress@arcor.de</a>><br>
Subject: [Nagios-users] Circular Map setup<br>
To: <a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>
Message-ID: <1237400180.5381.0@antares><br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
Hi all,<br>
<br>
I use Nagios to monitor several servers, redundant switches, and<br>
Windows PC's and printers.  Works perfectly, except for the circular<br>
status map...  The problem is that the icons of the components in the<br>
"outer ring" are overlapping (see attached screenshot).  Is there any<br>
way to influence the placement of icons in the circular map?<br>
<br>
Thanks in advance, Albrecht.<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: nagios-circular.png<br>
Type: image/png<br>
Size: 28691 bytes<br>
Desc: not available<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: not available<br>
Type: application/pgp-signature<br>
Size: 189 bytes<br>
Desc: not available<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Wed, 18 Mar 2009 19:16:30 +0000<br>
From: Jim Avery <<a href="mailto:jim@jimavery.me.uk">jim@jimavery.me.uk</a>><br>
Subject: Re: [Nagios-users] Nagios-SNMP<br>
To: Joseph Ribin Roy <<a href="mailto:Ribin.Roy@mformation.com">Ribin.Roy@mformation.com</a>><br>
Cc: <a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>
Message-ID:<br>
        <<a href="mailto:765d77c80903181216o7b8b7ccbvf1267df8a2bb1bf3@mail.gmail.com">765d77c80903181216o7b8b7ccbvf1267df8a2bb1bf3@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
2009/3/18 Joseph Ribin Roy <<a href="mailto:Ribin.Roy@mformation.com">Ribin.Roy@mformation.com</a>>:<br>
> Any feedback or other ways of integrating of Nagios-SNMP will be grateful.<br>
<br>
I use NagTrap.  It's probably not everyone's cup of tea but is easy to<br>
install and maintain (compared with the scripts I used before anyway).<br>
<br>
<a href="http://nagtrap.org" target="_blank">http://nagtrap.org</a><br>
<br>
Cheers,<br>
<br>
Jim<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Wed, 18 Mar 2009 19:23:44 +0000<br>
From: Jim Avery <<a href="mailto:jim@jimavery.me.uk">jim@jimavery.me.uk</a>><br>
Subject: Re: [Nagios-users] blank perfdata: not parsing macros<br>
To: <a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>
Message-ID:<br>
        <<a href="mailto:765d77c80903181223o47ffda5ah59010a84201d9f02@mail.gmail.com">765d77c80903181223o47ffda5ah59010a84201d9f02@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
2009/3/18 M P <<a href="mailto:reg@eyesopen.org">reg@eyesopen.org</a>>:<br>
> Other than compiling from source, any other tips?<br>
<br>
I would suggest you try PNP4Nagios, but again if you installed Nagios<br>
from repositories you're going to find it more difficult to get it<br>
working than if you installed it from source.<br>
<br>
Cheers,<br>
<br>
Jim<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Wed, 18 Mar 2009 19:41:03 +0000<br>
From: Jim Avery <<a href="mailto:jim@jimavery.me.uk">jim@jimavery.me.uk</a>><br>
Subject: Re: [Nagios-users] Circular Map setup<br>
To: Albrecht Dre? <<a href="mailto:albrecht.dress@arcor.de">albrecht.dress@arcor.de</a>><br>
Cc: <a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>
Message-ID:<br>
        <<a href="mailto:765d77c80903181241sdc38c14u9be59957258952e9@mail.gmail.com">765d77c80903181241sdc38c14u9be59957258952e9@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
2009/3/18 Albrecht Dre? <<a href="mailto:albrecht.dress@arcor.de">albrecht.dress@arcor.de</a>>:<br>
> Hi all,<br>
><br>
> I use Nagios to monitor several servers, redundant switches, and Windows<br>
> PC's and printers. ?Works perfectly, except for the circular status map...<br>
> ?The problem is that the icons of the components in the "outer ring" are<br>
> overlapping (see attached screenshot). ?Is there any way to influence the<br>
> placement of icons in the circular map?<br>
><br>
> Thanks in advance, Albrecht.<br>
<br>
You could try specifying 2d_coords in your host definitions.  See<br>
<a href="http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#host" target="_blank">http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#host</a><br>
<br>
But I recommend you try either NEXSM (can be tricky to install but is<br>
great for large networks) or the automap feature in NagVis (easy to<br>
install, but requires a MySQL database).<br>
<br>
hth,<br>
<br>
Jim<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 7<br>
Date: Wed, 18 Mar 2009 15:59:24 -0400<br>
From: Andrew Davis <<a href="mailto:nccomp@gmail.com">nccomp@gmail.com</a>><br>
Subject: [Nagios-users] Stuck on NRPE for OS X Server<br>
To: "<a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a>"<br>
        <<a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a>><br>
Message-ID: <<a href="mailto:49C1529C.2030106@gmail.com">49C1529C.2030106@gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
I have two Mac OS X servers, one running 10.3, the other running 10.4.<br>
Neither can be upgraded to 10.5 due to third party s/w constraints. Both<br>
are PPC based XServe's.<br>
<br>
Trying to compile nrpe with:<br>
<br>
    ./configure --sysconfdir=/etc/nagios --enable-ssl<br>
<br>
Initially, I got the "cannot find ssl libraries" error:<br>
<br>
    ~<br>
    checking for SSL headers... SSL headers found in /usr/local/ssl<br>
    checking for SSL libraries... configure: error: Cannot find ssl<br>
    libraries<br>
<br>
I downloaded the latest openssl and built it with:<br>
<br>
    ./config --prefix=/usr/local shared --openssldir=/usr/local/openssl<br>
    make<br>
    make test<br>
    make install<br>
<br>
I then had to edit ~/src/nrpe/configure and change the reference from<br>
libssl.so to libssl.dylib<br>
<br>
After that, nrpe compiled cleanly and I was able to move<br>
~src/nrpe/src/nrpe to /usr/local/sbin and start xinetd up. I've<br>
confirmed that port 5666 is open and xinetd is running:<br>
<br>
    /usr/local/src/nrpe-2.12/src root# ps waux|grep xinet|grep -v<br>
    greproot   29066   0.0 -0.0    27484    308  ??  Ss    3:53PM<br>
    0:00.02 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive<br>
    /usr/local/src/nrpe-2.12/src root# netstat -an|grep 5666tcp4<br>
    0      0  *.5666                 *.*                    LISTEN<br>
<br>
However, when connecting from the remote server, I get:<br>
<br>
    /usr/local/nagios/libexec/check_nrpe -H <a href="http://host.mydomain.org" target="_blank">host.mydomain.org</a><br>
    CHECK_NRPE: Error - Could not complete SSL handshake.<br>
<br>
The same test but w/o SSL gives yields:<br>
<br>
    [nagios@nephilim src]$ /usr/local/nagios/libexec/check_nrpe -n -H<br>
    <a href="http://host.mydomain.org" target="_blank">host.mydomain.org</a><br>
    CHECK_NRPE: Received 0 bytes from daemon.  Check the remote server<br>
    logs for error messages.<br>
<br>
So two questions:<br>
<br>
1) I'm a UNIX guy, but obviously Mac's are A) different and B) a tad<br>
different being BSD-based. So what's the proper way to stop/restart the<br>
xinetd daemon?<br>
2) Any thoughts on SSL handshake error? I've googled it, but I'm not<br>
getting very far.<br>
<br>
Anyone have a step-by-step for compiling nagios plugins and NRPE from<br>
source on OS X 10.x (specifically 10.3 and 10.4)? I'm using NRPE for all<br>
other internal hosts, so I prefer to use it for the Mac's too. I know I<br>
could do it via check_by_ssh and get around this, but I prefer to use<br>
NRPE if I can.<br>
<br>
--<br>
<br>
<br>
  A. Davis<br>
  Email:     <a href="mailto:nccomp@gmail.com">nccomp@gmail.com</a><br>
<br>
  "There is no limit to what a man can accomplish<br>
   if he doesn't care who gets the credit." - Ronald Reagan<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
<br>
------------------------------<br>
<br>
Message: 8<br>
Date: Wed, 18 Mar 2009 16:09:31 -0400<br>
From: Andrew Davis <<a href="mailto:nccomp@gmail.com">nccomp@gmail.com</a>><br>
Subject: Re: [Nagios-users] Stuck on NRPE for OS X Server<br>
To: "<a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a>"<br>
        <<a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a>><br>
Message-ID: <<a href="mailto:49C154FB.2010509@gmail.com">49C154FB.2010509@gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
FYI: /var/log/system.log on the client shows:<br>
<br>
Mar 18 16:08:07 shu xinetd[29066]: START: nrpe pid=557 from=10.1.1.170<br>
Mar 18 16:08:07 shu nrpe[557]: Error: NRPE daemon cannot be run as<br>
user/group root!<br>
<br>
whether I do the default test (with SSL) or use the -n flag to test w/o<br>
SSL. The odd thing is that the nrpe config in /etc/xinetd.d is set to<br>
run as nobody:nobody and /etc/nagios/nrpe.cfg is owned by nobody:nobody.<br>
Only /usr/local/sbin/nrpe is owned by root (as it should be), but is<br>
also set to 755 perms. I've compared to a Linux box I have with NRPE and<br>
xinetd working properly and the permissions are identical.<br>
<br>
I'm stumped...<br>
<br>
Andrew Davis wrote:<br>
> I have two Mac OS X servers, one running 10.3, the other running 10.4.<br>
> Neither can be upgraded to 10.5 due to third party s/w constraints.<br>
> Both are PPC based XServe's.<br>
><br>
> Trying to compile nrpe with:<br>
><br>
>     ./configure --sysconfdir=/etc/nagios --enable-ssl<br>
><br>
> Initially, I got the "cannot find ssl libraries" error:<br>
><br>
>     ~<br>
>     checking for SSL headers... SSL headers found in /usr/local/ssl<br>
>     checking for SSL libraries... configure: error: Cannot find ssl<br>
>     libraries<br>
><br>
> I downloaded the latest openssl and built it with:<br>
><br>
>     ./config --prefix=/usr/local shared --openssldir=/usr/local/openssl<br>
>     make<br>
>     make test<br>
>     make install<br>
><br>
> I then had to edit ~/src/nrpe/configure and change the reference from<br>
> libssl.so to libssl.dylib<br>
><br>
> After that, nrpe compiled cleanly and I was able to move<br>
> ~src/nrpe/src/nrpe to /usr/local/sbin and start xinetd up. I've<br>
> confirmed that port 5666 is open and xinetd is running:<br>
><br>
>     /usr/local/src/nrpe-2.12/src root# ps waux|grep xinet|grep -v<br>
>     greproot   29066   0.0 -0.0    27484    308  ??  Ss    3:53PM<br>
>     0:00.02 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive<br>
>     /usr/local/src/nrpe-2.12/src root# netstat -an|grep 5666tcp4<br>
>     0      0  *.5666                 *.*                    LISTEN<br>
><br>
> However, when connecting from the remote server, I get:<br>
><br>
>     /usr/local/nagios/libexec/check_nrpe -H <a href="http://host.mydomain.org" target="_blank">host.mydomain.org</a><br>
>     CHECK_NRPE: Error - Could not complete SSL handshake.<br>
><br>
> The same test but w/o SSL gives yields:<br>
><br>
>     [nagios@nephilim src]$ /usr/local/nagios/libexec/check_nrpe -n -H<br>
>     <a href="http://host.mydomain.org" target="_blank">host.mydomain.org</a><br>
>     CHECK_NRPE: Received 0 bytes from daemon.  Check the remote server<br>
>     logs for error messages.<br>
><br>
> So two questions:<br>
><br>
> 1) I'm a UNIX guy, but obviously Mac's are A) different and B) a tad<br>
> different being BSD-based. So what's the proper way to stop/restart<br>
> the xinetd daemon?<br>
> 2) Any thoughts on SSL handshake error? I've googled it, but I'm not<br>
> getting very far.<br>
><br>
> Anyone have a step-by-step for compiling nagios plugins and NRPE from<br>
> source on OS X 10.x (specifically 10.3 and 10.4)? I'm using NRPE for<br>
> all other internal hosts, so I prefer to use it for the Mac's too. I<br>
> know I could do it via check_by_ssh and get around this, but I prefer<br>
> to use NRPE if I can.<br>
> --<br>
><br>
><br>
>   A. Davis<br>
>   Email:     <a href="mailto:nccomp@gmail.com">nccomp@gmail.com</a><br>
><br>
>   "There is no limit to what a man can accomplish<br>
>    if he doesn't care who gets the credit." - Ronald Reagan<br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
<br>
------------------------------<br>
<br>
Message: 9<br>
Date: Wed, 18 Mar 2009 16:57:30 -0400<br>
From: Andrew Davis <<a href="mailto:nccomp@gmail.com">nccomp@gmail.com</a>><br>
Subject: Re: [Nagios-users] Stuck on NRPE for OS X Server<br>
To: "<a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a>"<br>
        <<a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a>><br>
Message-ID: <<a href="mailto:49C1603A.8060702@gmail.com">49C1603A.8060702@gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
If I'm reading this correctly, the line about "NRPE daemon cannot be run<br>
as user/group root!" is directly from the source code of NRPE. Its not<br>
an xinetd thing. I've confirmed that xinetd is running and listening on<br>
port 5666. I tried changing the owner/group from nobody:nobody to<br>
another unprivileged user, but it didn't work. Same results. It appears<br>
that despite my configuring the /etc/nagios/nrpe.cfg and the<br>
/etc/xinetd.d/nrpe files to use a user other than root, it still tries<br>
to start it as the root user and thus when an incoming connection comes<br>
in, it gives the "NRPE daemon cannot be run as user/group root!" error.<br>
Any thoughts on how to rectify this? Since NRPE is working fine on<br>
Linux, is this just a Mac OS X thing? Any help would be immensely<br>
appreciated.<br>
<br>
AD<br>
<br>
Andrew Davis wrote:<br>
> FYI: /var/log/system.log on the client shows:<br>
><br>
> Mar 18 16:08:07 shu xinetd[29066]: START: nrpe pid=557 from=10.1.1.170<br>
> Mar 18 16:08:07 shu nrpe[557]: Error: NRPE daemon cannot be run as<br>
> user/group root!<br>
><br>
> whether I do the default test (with SSL) or use the -n flag to test<br>
> w/o SSL. The odd thing is that the nrpe config in /etc/xinetd.d is set<br>
> to run as nobody:nobody and /etc/nagios/nrpe.cfg is owned by<br>
> nobody:nobody. Only /usr/local/sbin/nrpe is owned by root (as it<br>
> should be), but is also set to 755 perms. I've compared to a Linux box<br>
> I have with NRPE and xinetd working properly and the permissions are<br>
> identical.<br>
><br>
> I'm stumped...<br>
><br>
> Andrew Davis wrote:<br>
>> I have two Mac OS X servers, one running 10.3, the other running<br>
>> 10.4. Neither can be upgraded to 10.5 due to third party s/w<br>
>> constraints. Both are PPC based XServe's.<br>
>><br>
>> Trying to compile nrpe with:<br>
>><br>
>>     ./configure --sysconfdir=/etc/nagios --enable-ssl<br>
>><br>
>> Initially, I got the "cannot find ssl libraries" error:<br>
>><br>
>>     ~<br>
>>     checking for SSL headers... SSL headers found in /usr/local/ssl<br>
>>     checking for SSL libraries... configure: error: Cannot find ssl<br>
>>     libraries<br>
>><br>
>> I downloaded the latest openssl and built it with:<br>
>><br>
>>     ./config --prefix=/usr/local shared --openssldir=/usr/local/openssl<br>
>>     make<br>
>>     make test<br>
>>     make install<br>
>><br>
>> I then had to edit ~/src/nrpe/configure and change the reference from<br>
>> libssl.so to libssl.dylib<br>
>><br>
>> After that, nrpe compiled cleanly and I was able to move<br>
>> ~src/nrpe/src/nrpe to /usr/local/sbin and start xinetd up. I've<br>
>> confirmed that port 5666 is open and xinetd is running:<br>
>><br>
>>     /usr/local/src/nrpe-2.12/src root# ps waux|grep xinet|grep -v<br>
>>     greproot   29066   0.0 -0.0    27484    308  ??  Ss    3:53PM<br>
>>     0:00.02 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive<br>
>>     /usr/local/src/nrpe-2.12/src root# netstat -an|grep<br>
>>     5666tcp4       0      0  *.5666<br>
>>     *.*                    LISTEN<br>
>><br>
>> However, when connecting from the remote server, I get:<br>
>><br>
>>     /usr/local/nagios/libexec/check_nrpe -H <a href="http://host.mydomain.org" target="_blank">host.mydomain.org</a><br>
>>     CHECK_NRPE: Error - Could not complete SSL handshake.<br>
>><br>
>> The same test but w/o SSL gives yields:<br>
>><br>
>>     [nagios@nephilim src]$ /usr/local/nagios/libexec/check_nrpe -n -H<br>
>>     <a href="http://host.mydomain.org" target="_blank">host.mydomain.org</a><br>
>>     CHECK_NRPE: Received 0 bytes from daemon.  Check the remote<br>
>>     server logs for error messages.<br>
>><br>
>> So two questions:<br>
>><br>
>> 1) I'm a UNIX guy, but obviously Mac's are A) different and B) a tad<br>
>> different being BSD-based. So what's the proper way to stop/restart<br>
>> the xinetd daemon?<br>
>> 2) Any thoughts on SSL handshake error? I've googled it, but I'm not<br>
>> getting very far.<br>
>><br>
>> Anyone have a step-by-step for compiling nagios plugins and NRPE from<br>
>> source on OS X 10.x (specifically 10.3 and 10.4)? I'm using NRPE for<br>
>> all other internal hosts, so I prefer to use it for the Mac's too. I<br>
>> know I could do it via check_by_ssh and get around this, but I prefer<br>
>> to use NRPE if I can.<br>
>> --<br>
>><br>
>><br>
>>   A. Davis<br>
>>   Email:     <a href="mailto:nccomp@gmail.com">nccomp@gmail.com</a><br>
>><br>
>>   "There is no limit to what a man can accomplish<br>
>>    if he doesn't care who gets the credit." - Ronald Reagan<br>
>><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
<br>
------------------------------<br>
<br>
Message: 10<br>
Date: Wed, 18 Mar 2009 17:19:11 -0400<br>
From: Allan Clark <<a href="mailto:allanc@chickenandporn.com">allanc@chickenandporn.com</a>><br>
Subject: Re: [Nagios-users] Stuck on NRPE for OS X Server<br>
To: <a href="mailto:nccomp@gmail.com">nccomp@gmail.com</a><br>
Cc: "<a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a>"<br>
        <<a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a>><br>
Message-ID:<br>
        <<a href="mailto:37c712e0903181419q4fda28e8o83b1cd5464f69ab3@mail.gmail.com">37c712e0903181419q4fda28e8o83b1cd5464f69ab3@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Reply is bottom-posted.<br>
<br>
On Wed, Mar 18, 2009 at 16:57, Andrew Davis <<a href="mailto:nccomp@gmail.com">nccomp@gmail.com</a>> wrote:<br>
<br>
>  If I'm reading this correctly, the line about "NRPE daemon cannot be run<br>
> as user/group root!" is directly from the source code of NRPE. Its not an<br>
> xinetd thing. I've confirmed that xinetd is running and listening on port<br>
> 5666. I tried changing the owner/group from nobody:nobody to another<br>
> unprivileged user, but it didn't work. Same results. It appears that despite<br>
> my configuring the /etc/nagios/nrpe.cfg and the /etc/xinetd.d/nrpe files to<br>
> use a user other than root, it still tries to start it as the root user and<br>
> thus when an incoming connection comes in, it gives the "NRPE daemon cannot<br>
> be run as user/group root!" error. Any thoughts on how to rectify this?<br>
> Since NRPE is working fine on Linux, is this just a Mac OS X thing? Any help<br>
> would be immensely appreciated.<br>
><br>
> AD<br>
><br>
><br>
> Andrew Davis wrote:<br>
><br>
> FYI: /var/log/system.log on the client shows:<br>
><br>
> Mar 18 16:08:07 shu xinetd[29066]: START: nrpe pid=557 from=10.1.1.170<br>
> Mar 18 16:08:07 shu nrpe[557]: Error: NRPE daemon cannot be run as<br>
> user/group root!<br>
><br>
> whether I do the default test (with SSL) or use the -n flag to test w/o<br>
> SSL. The odd thing is that the nrpe config in /etc/xinetd.d is set to run as<br>
> nobody:nobody and /etc/nagios/nrpe.cfg is owned by nobody:nobody. Only<br>
> /usr/local/sbin/nrpe is owned by root (as it should be), but is also set to<br>
> 755 perms. I've compared to a Linux box I have with NRPE and xinetd working<br>
> properly and the permissions are identical.<br>
><br>
> I'm stumped...<br>
><br>
> Andrew Davis wrote:<br>
><br>
> I have two Mac OS X servers, one running 10.3, the other running 10.4.<br>
> Neither can be upgraded to 10.5 due to third party s/w constraints. Both are<br>
> PPC based XServe's.<br>
><br>
> Trying to compile nrpe with:<br>
><br>
> ./configure --sysconfdir=/etc/nagios --enable-ssl<br>
><br>
> Initially, I got the "cannot find ssl libraries" error:<br>
><br>
> ~<br>
> checking for SSL headers... SSL headers found in /usr/local/ssl<br>
> checking for SSL libraries... configure: error: Cannot find ssl libraries<br>
><br>
> I downloaded the latest openssl and built it with:<br>
><br>
> ./config --prefix=/usr/local shared --openssldir=/usr/local/openssl<br>
> make<br>
> make test<br>
> make install<br>
><br>
> I then had to edit ~/src/nrpe/configure and change the reference from<br>
> libssl.so to libssl.dylib<br>
><br>
> After that, nrpe compiled cleanly and I was able to move ~src/nrpe/src/nrpe<br>
> to /usr/local/sbin and start xinetd up. I've confirmed that port 5666 is<br>
> open and xinetd is running:<br>
><br>
> /usr/local/src/nrpe-2.12/src root# ps waux|grep xinet|grep -v greproot<br>
> 29066   0.0 -0.0    27484    308  ??  Ss    3:53PM   0:00.02<br>
> /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive<br>
> /usr/local/src/nrpe-2.12/src root# netstat -an|grep 5666tcp4       0<br>
> 0  *.5666                 *.*                    LISTEN<br>
><br>
> However, when connecting from the remote server, I get:<br>
><br>
> /usr/local/nagios/libexec/check_nrpe -H <a href="http://host.mydomain.org" target="_blank">host.mydomain.org</a><br>
> CHECK_NRPE: Error - Could not complete SSL handshake.<br>
><br>
> The same test but w/o SSL gives yields:<br>
><br>
> [nagios@nephilim src]$ /usr/local/nagios/libexec/check_nrpe -n -H<br>
> <a href="http://host.mydomain.org" target="_blank">host.mydomain.org</a><br>
> CHECK_NRPE: Received 0 bytes from daemon.  Check the remote server logs for<br>
> error messages.<br>
><br>
> So two questions:<br>
><br>
> 1) I'm a UNIX guy, but obviously Mac's are A) different and B) a tad<br>
> different being BSD-based. So what's the proper way to stop/restart the<br>
> xinetd daemon?<br>
> 2) Any thoughts on SSL handshake error? I've googled it, but I'm not<br>
> getting very far.<br>
><br>
> Anyone have a step-by-step for compiling nagios plugins and NRPE from<br>
> source on OS X 10.x (specifically 10.3 and 10.4)? I'm using NRPE for all<br>
> other internal hosts, so I prefer to use it for the Mac's too. I know I<br>
> could do it via check_by_ssh and get around this, but I prefer to use NRPE<br>
> if I can.<br>
><br>
> --<br>
><br>
><br>
On a Mac, your xinetd is a bolt-on over the launchd that's there by default;<br>
you've obviously got it running.  Since you're in /etc/xinetd.d/<something>,<br>
you need to cnfigure a different username via xinetd's config.  Look for a<br>
/etc/xinetd.d/nrpe file, or similar, containing the config for your nrpe<br>
service.  I tend to grep for the port number in order to find the file.<br>
Remember to check /local/*<br>
<br>
The time service has an example with juicy comments:<br>
<br>
<br>
service time<br>
{<br>
# This is for quick on or off of the service<br>
        disable         = yes<br>
...<br>
...<br>
# External services must fill out the following<br>
#       user            =<br>
#       group           =<br>
...<br>
...<br>
}<br>
<br>
<br>
Take a look there, see if you can choose a better username and/or group and<br>
if your port of xinetd honours it.  I don't know if you have a nrpe user, or<br>
run it as nobody.<br>
<br>
A better option would be a proper launchd config, allowing you to shutdown<br>
xinetd if you're installing it there for this purpose only, but then it's a<br>
Mac-only thing, and would be more difficult to maintain for non-Mac people.<br>
<br>
Allan<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
<br>
------------------------------<br>
<br>
------------------------------------------------------------------------------<br>
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are<br>
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and<br>
easily build your RIAs with Flex Builder, the Eclipse(TM)based development<br>
software that enables intelligent coding and step-through debugging.<br>
Download the free 60 day trial. <a href="http://p.sf.net/sfu/www-adobe-com" target="_blank">http://p.sf.net/sfu/www-adobe-com</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
<br>
<br>
End of Nagios-users Digest, Vol 34, Issue 31<br>
********************************************<br>
</blockquote></div><br><br clear="all"><br>-- <br>Anirudh Srinivasan<br><br>