<br><br><div><span class="gmail_quote">On 12/7/05, <b class="gmail_sendername"><a href="mailto:Thomas.Zimmer@oppenheim.de">Thomas.Zimmer@oppenheim.de</a></b> <<a href="mailto:Thomas.Zimmer@oppenheim.de">Thomas.Zimmer@oppenheim.de
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><font color="#0000ff" face="Arial" size="2"><span>as the
check-name "check_LOCAL_disk_mail" says, these two are local check. Many checks
are not able to check a host resp. a service remote via a tcp-connection
o.sim.</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div><font color="#0000ff" face="Arial" size="2"><span>To
execute such services on a remote machine, youŽll have to use nrpe, nsca or
ssh (maybe there are more possib.). The service checks you want to exec. hav to
reside on the remote machine. </span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div><font color="#0000ff" face="Arial" size="2"><span>Assuming you have running ssh-services
(configuring nrpe is a bit more complicated):</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div><font color="#0000ff" face="Arial" size="2"><span>#
command for executing checks via ssh</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span>define
command
{<br>
command_name
check_by_ssh<br>
command_line
$USER1$/check_by_ssh -H $HOSTADDRESS$ -C "./<plugins-dir>/$ARG1$
$ARG2$"<br>
}<br></span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span># the
remotecheck</span></font></div><span class="q">
<div><font color="#0000ff" face="Arial" size="2"><span>define
service
{<br>
host_name mail</span></font></div></span>
<div><font face="Arial" size="2"><span><font color="#0000ff">
service_description check_swap_on_mail<br>
check_command
check_by_ssh!<font face="Times New Roman" size="3">check_local_disk_mail<font face="Arial" size="2">!<optional additional
params></font></font><br>
</font><font color="#0000ff"><font face="Times New Roman" size="3">max_check_attempts
5<span class="q"><br>
normal_check_interval
5<br>
retry_check_interval
3<br>
check_period
nonworkhours<br>
notification_interval
30<br>
notification_period
nonworkhours<br>
notification_options
w,c,r<br>
contact_groups
linux-admins</span></font><br>
}</font></span></font></div>
<div> </div>
<div><font color="#0000ff" face="Arial" size="2"><span>This
should work. NRPE function in a similar way; but on the remote host a daemon is
running, and the checks that may be executed on the remote host are configured
on the remote host.</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div><font color="#0000ff" face="Arial" size="2"><span>NSCA
inverts the direction of getting check results; youŽll have to compile a "small
nagios", configure all checks for the machine locally, and then you can pass all
results as "passive chak results" via the "send_nsca" plugin to your central
nagios-server.</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div><font color="#0000ff" face="Arial" size="2"><span>I
think the nrpe alternative has greater performance as executing checks via
ssh, but you lose the ability of fully central configuration. i never used nsca
myself.</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"></font> </div>
<div><span><font color="#0000ff" face="Arial" size="2">Greetz,</font></span></div>
<p><span lang="de"><b><font face="Arial" size="1">Thomas Zimmer</font></b></span>
<br><span lang="de"><font face="Arial" size="1">Produktservice &
Betrieb</font></span> <br><span lang="de"><font face="Arial" size="1">Betrieb &
Support</font></span> <br><span lang="de"><font face="Arial" size="1">Sal. Oppenheim
jr. & Cie., Frankfurt a. Main</font></span> </p></blockquote></div><br>
hey Mr. Thomas,<br>
<br>
Thanks for your guidance.<br>
<br>
Thanks & Regards<br>
<br>
Ankush Grover<br>