<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
Have you define the "check_users" command in the nrpe.cfg file as this <br>
command[check_users]=/usr/local/nagios/libexec/check_users -w $ARG1$ -c
$ARG2$ ?<br>
<br>
Then to test it in the nagios server, you must execute the following
command:<br>
<strong>./check_nrpe -H 1.1.1.126 -p 5666 -c check_users -a 10 25<br>
<br>
</strong>If it works, in service.cfg the must write something as this :<br>
define service {<br>
use generic-service<br>
host_name xxxx<br>
service_description Users<br>
contact_groups nagios-admins<br>
check_period 24x7<br>
notification_interval 2880<br>
notification_options w,u,c,r<br>
notification_period 24x7<br>
check_command check_nrpe!check_users!10!25 <br>
max_check_attempts 3<br>
normal_check_interval 10<br>
retry_check_interval 1<br>
}<br>
<br>
serwah sabet ghadam wrote:<br>
<blockquote type="cite"
cite="mid20040613064935.88567.qmail@web52307.mail.yahoo.com">
<div><br>
Thanks a lot for your complete guidance,</div>
<div>I checked them and now I have encountered another problem:</div>
<div> </div>
<div>I have put NRPE daemon and its config file on the client</div>
<div>and compiled it there too.</div>
<div>Then I have defined a service in my nagios/etc/service.cfg</div>
<div>with </div>
<div><strong>command check_nrpe!check_users</strong></div>
<div>and I wanted to rest it via my linux shel and I executed NRPE in
background mode in the client:</div>
<div><strong>./nrpe -c /etc/nrpe.cfg -d &<br>
</strong></div>
<div>and in the server I wrote:</div>
<div><strong> ./check_nrpe -H 1.1.1.126 -p 5666 -c
check_nrpe!check_users</strong></div>
<div>the result is:</div>
<div><strong>-bash: !check_users: event not found<br>
</strong></div>
<div><strong></strong> </div>
<div>and in the web interface the status information is:</div>
<div><strong>Connection refused by host </strong><br>
</div>
<div>Have I missed anything???</div>
<div> </div>
<div>Thabk you all.</div>
<div>Sirwah</div>
<div> </div>
<div><br>
<i><strong>Andreas Ericsson <a class="moz-txt-link-rfc2396E" href="mailto:ae@op5.se"><ae@op5.se></a></strong></i> wrote:</div>
<blockquote class="replbq"
style="border-left: 2px solid rgb(16, 16, 255); padding-left: 5px; margin-left: 5px;">serwah
sabet ghadam wrote:<br>
> Hi, <br>
> I want to use nrpe to get, for example, the <br>
> result of check_users of a remote host,<br>
> perhaps it be an elementary question<br>
> but I'm confused!<br>
> <br>
<br>
check_nrpe requires that the daemon is installed and properly
configured <br>
on the remote host.<br>
<br>
Both the daemon and the plugin needs to use the same type of encryption <br>
(currently only ssl or none at all).<br>
<br>
The plugin which you want to run must be present on the remote host.<br>
<br>
The nagios server's IP must be mentioned in the allowed_hosts_ip in
your <br>
nrpe configuration file.<br>
<br>
> I've searched the mailing list but didn't find <br>
> my answer.<br>
> <br>
> <br>
> I did upon the README file of the NRPE pacakge<br>
> that I've downloaded:<br>
> I sefined a command in checkcommand.cfg <br>
> define command{<br>
! > command_name check_nrpe<br>
> aommand_line /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$
-c $ARG1$<br>
> } <br>
> <br>
> and defined a service with<br>
> check_command check_nrpe ! check_users<br>
> <br>
<br>
Remove the spaces.<br>
<br>
> and I didn't work under inetd or xinetd.<br>
> <br>
> are these steps enaugh??<br>
> I see nothing in the servce detail in the web interface.<br>
> <br>
<br>
You also have to restart Nagios. Do that and then tell me the output of <br>
the check_nrpe command (the status field in the GUI), and I might be <br>
able to help you further.<br>
<br>
<br>
> I appreciate your help.<br>
> Sirwah<br>
<br>
-- <br>
Sourcerer / Andreas Ericsson<br>
NRPE Maintainer<br>
OP5 AB<br>
+46 (0)733 709032<br>
<a class="moz-txt-link-abbreviated" href="mailto:andreas.ericsson@op5.se">andreas.ericsson@op5.se</a><br>
<br>
<br>
-------------------------------------------------------<br>
This SF.Net email is sponsored by the new InstallShield X.<br>
>From Windows to Linux, servers to mobile, InstallShield X is the<br>
one installation-authoring solution that does it all. Learn more and<br>
evaluate today! <a class="moz-txt-link-freetext" href="http://www.installshield.com/Dev2Dev/0504">http://www.installshield.com/Dev2Dev/0504</a><br>
_______________________________________________<br>
Nagiosplug-help mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:Nagiosplug-help@lists.sourceforge.net">Nagiosplug-help@lists.sourceforge.net</a><br>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagiosplug-help">https://lists.sourceforge.net/lists/listinfo/nagiosplug-help</a><br>
::: Please include plugins version (-v) and OS when reporting any
issue. <br>
::: Messages without supporting info will risk being sent to /dev/null</blockquote>
<p> </p>
<hr size="1">Do you Yahoo!?<br>
Friends. Fun. <a href="http://messenger.yahoo.com/">Try the all-new
Yahoo! Messenger</a> </blockquote>
<br>
<pre class="moz-signature" cols="72">--
**********************************
VERDON Carole
Ingénieur Système
CICT - Université Paul Sabatier
118, route de Narbonne
31062 Toulouse Cedex
Tél.: 05.61.36.60.44
Fax: 05.61.52.14.58
Mail: <a class="moz-txt-link-abbreviated" href="mailto:verdon@cict.fr">verdon@cict.fr</a>
**********************************
</pre>
</body>
</html>