<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/1.0.2">
</HEAD>
<BODY>
Hello,
<BR>

<BR>
Are you allowed to run such command from your nagios server, and query your FreeBSD server ?
<BR>
You can try telnet FreeBSD_Server 5666 (If you've set the nrpe service on the port 5666, as the default one)
<BR>
Did you restart your (x)inetd to take in charge the new service ?
<BR>

<BR>
HTH
<BR>
Regards
<BR>
Pascal Miquet
<BR>

<BR>
Le jeu 28/11/2002 à 13:32, Thomas Guldener a écrit :
    <BLOCKQUOTE>
<PRE><FONT COLOR="#737373"><FONT SIZE="3"><I>Hello Everybody </FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>I have some problems to configurate nrpe on my freebsd. I have runnig</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>nagios 1.0b6 and i will do some external checks on other boxes. I have</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>already done the following configuration:</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>On the local FreeBSD box:</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>Checkcommands.cfg</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I> # 'check-nrpe' command definition</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I> define command{</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>        command_name    check_nrpe</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>        command_line    $USER1$/check_nrpe $HOSTADDRESS$ -c $ARG1$</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>        }</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>Service.cfg</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I> define service{</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>        use                             generic-service</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>        host_name                       dub00as0</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>        service_description             check-users</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>        check_command                   check_nrpe!check-users</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>    ....</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>        }</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>And on the other FreeBSD box:</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>I have installed the nrpe and the nrpe.cfg under /usr/local/etc/nrpe/</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>and i have installed the nagios plugins from the FreeBSD Ports. I have</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>open hosts.allow for my first box for all services. After I have done</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>the following configurations:</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>Nrpe.cfg</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I> # PORT NUMBER</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I> server_port=5xxx</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I> debug=1</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I> # Command  command[check_users]=/usr/local/libexec/nagios/check_users 5</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>10</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>Inetd.conf</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I> nrpe    stream  tcp     nowait          root</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>/usr/local/etc/nrpe/nrpe -i /usr/local/etc/nrpe/nrpe.cfg</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>Services</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I> nrpe            5xxx/tcp   #NRPE</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>When I start now Nagios I become the error message CHECK_NRPE: Received</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>0 bytes. Are we allowed to connect to the host? </FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>What can I do ore wich missconfiguration i have? Please help me.</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>Greats </FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>Thomas</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>-------------------------------------------------------</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>This SF.net email is sponsored by: Get the new Palm Tungsten T </FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>handheld. Power & Color in a compact size! </FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>_______________________________________________</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>Nagios-users mailing list</FONT></FONT></I>
<FONT COLOR="#737373"><FONT SIZE="3"><I>Nagios-users@lists.sourceforge.net</FONT></FONT></I></PRE>
    </BLOCKQUOTE>
<A HREF="https://lists.sourceforge.net/lists/listinfo/nagios-users"><FONT SIZE="3"><I>https://lists.sourceforge.net/lists/listinfo/nagios-users</FONT></I></A>
    <BLOCKQUOTE>
<PRE></PRE>
    </BLOCKQUOTE>
</BODY>
</HTML>