<html>
<head>
</head>
<body>
There is a plugin I contributed, that I believe now has the name check_remote_nagios_status.pl,
or something like that. What you can do is set up each service with a common
name (i.e. virual-a, virutal-b, etc) and then add a check with the check_remote_nagios_status
plugin. You can tell it to group service together by common service name,
common host name, or pattern. It can also handle acknowledgements, downtimes,
etc. The plugin runs local on a machine with Nagios running (it was renamed
to _remote_ because it can be used by 1 nagios instance to get the status
of another instance, over SSH, nrpe, etc).<br>
<br>
Russell Scibetti<br>
<br>
Thomas Nilsen wrote:<br>
<blockquote type="cite" cite="mid:FF99305091A6AA458423262755A610FE7D5D4D@svgw2k04.roxardomain.roxar.com">
<title>Virtual Services???</title>
<meta content="MSHTML 6.00.2800.1141" name="GENERATOR">
<style></style>
<div><font face="Arial" color="#0000ff" size="2"><span class="002362517-09052003">
Maybe a host/service dependency setup could help you here...</span></font></div>
<div> </div>
<div><font face="Arial" color="#0000ff" size="2"><span class="002362517-09052003">
Have a look at <a href="http://nagios.sourceforge.net/docs/1_0/dependencies.html">
http://nagios.sourceforge.net/docs/1_0/dependencies.html</a>
and </span></font></div>
<blockquote dir="Ltr" style="padding-left: 5px; margin-left: 5px; border-left-width: 2px; border-left-style: solid; border-left-color: rgb(0,0,255); margin-right: 0px; ">
<div class="OutlookMessageHeader" dir="Ltr" align="Left"><font face="Tahoma" size="2">
-----Original Message-----<br>
<b>From:</b> Miguel A. Torres [<a class="moz-txt-link-freetext" href="mailto:matorres@prisacom.com">mailto:matorres@prisacom.com</a>]<br>
<b>Sent:</b> Friday, May 09, 2003 6:35 PM<br>
<b>To:</b> Jason Lancaster; <a class="moz-txt-link-abbreviated" href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>
<b>Subject:</b> RE: [Nagios-users] Virtual Services???<br>
<br>
</font></div>
<div><font face="Arial" color="#0000ff" size="2"><span class="037330616-09052003">
Hello Jason, </span></font></div>
<div> </div>
<div><font face="Arial" color="#0000ff" size="2"><span class="037330616-09052003">
Thanks for your quickly answer. I think that you don't undertand what
I mean by a "virtual service". I`m try to explain it better with a example:</span></font></div>
<div> </div>
<div><font face="Arial" color="#0000ff" size="2"><span class="037330616-09052003">
I have 3 servers with apache:</span></font></div>
<div> </div>
<div><span class="037330616-09052003">
<div><font face="Arial" color="#0000ff" size="2">define host{<br>
host_name <span class="037330616-09052003">server</span><span class="037330616-09052003">
1</span></font></div>
<div><span class="037330616-09052003"></span><font face="Arial" color="#0000ff" size="2">
address <span class="037330616-09052003">1.1.1.1</span><br>
}</font></div>
<div><font face="Arial" color="#0000ff" size="2"> </font><span class="037330616-09052003"><font face="Arial" color="#0000ff" size="2">
</font></span></div>
<div>
<div><font size="2"><font color="#0000ff"><font face="Arial">define host{<br>
host_name <span class="037330616-09052003">server2</span></font></font></font></div>
<div><span class="037330616-09052003"></span><font size="2"><font face="Arial"><font color="#0000ff">
address <span class="037330616-09052003">1.1.1.2</span></font></font><br>
<font face="Arial" color="#0000ff">}</font></font></div>
<div> </div>
<div><span class="037330616-09052003"><font face="Arial" color="#0000ff" size="2">
<div><font size="2"><font color="#0000ff"><font face="Arial">define host{<br>
host_name <span class="037330616-09052003">server3</span></font></font></font></div>
<div><span class="037330616-09052003"></span><font size="2"><font face="Arial"><font color="#0000ff">
address <span class="037330616-09052003">1.1.1.3</span></font></font><br>
<font face="Arial" color="#0000ff">}</font></font></div>
========================</font></span><span class="037330616-09052003"></span></div>
<div><font size="2"><font color="#0000ff"><font face="Arial">define <span class="037330616-09052003">
service</span>{<br>
host_name <span class="037330616-09052003">server</span><span class="037330616-09052003">
1</span></font></font></font></div>
<div><span class="037330616-09052003"></span><font face="Arial" color="#0000ff" size="2">
<span class="037330616-09052003">service_description HTTP check</span></font></div>
<div><font face="Arial" color="#0000ff" size="2"><span class="037330616-09052003"></span>
}</font></div>
<div> </div>
<div><span class="037330616-09052003">
<div><font size="2"><font color="#0000ff"><font face="Arial">define <span class="037330616-09052003">
service</span>{<br>
host_name <span class="037330616-09052003">server2</span></font></font></font></div>
<div><span class="037330616-09052003"></span><font size="2"><font color="#0000ff"><font face="Arial">
<span class="037330616-09052003">service_description HTTP check</span></font></font></font></div>
<div><span class="037330616-09052003"></span><font face="Arial" color="#0000ff" size="2">
}</font></div>
<div><font face="Arial" color="#0000ff" size="2"> </font><font face="Arial" color="#0000ff" size="2"><span class="037330616-09052003">
</span></font></div>
<div>
<div><font face="Arial" color="#0000ff" size="2"><font size="2"><font color="#0000ff"><font face="Arial">
define <span class="037330616-09052003">service</span>{<br>
host_name <span class="037330616-09052003">server3</span></font></font></font></font></div>
<div><span class="037330616-09052003"></span><font face="Arial" color="#0000ff" size="2"><font size="2"><font color="#0000ff"><font face="Arial">
<span class="037330616-09052003">service_description HTTP check</span></font></font></font></font></div>
<div><span class="037330616-09052003"></span><font face="Arial" color="#0000ff" size="2"><font face="Arial" color="#0000ff" size="2">
}</font></font></div>
</div>
<div> </div>
<div><font face="Arial" color="#0000ff" size="2"><span class="037330616-09052003">
These services are in diferent hosts and serve the same URL's, they are
in balancing. Now I want to define a "virtual host" that group these 3
services. The "virtual host" should be configured with this rules:</span></font></div>
<div> </div>
<div><font face="Arial" color="#0000ff" size="2"><span class="037330616-09052003">
- If only one web server turn to critical state ------> OK</span></font></div>
<div><font face="Arial" color="#0000ff" size="2"><span class="037330616-09052003">
- If more than one server turn to critical state ------> WARNING</span></font></div>
<div><font face="Arial" color="#0000ff" size="2"><span class="037330616-09052003">
- If all de web servers turn to critical state ----------> CRITICAL</span></font></div>
<div> </div>
<div><font face="Arial" color="#0000ff" size="2"><span class="037330616-09052003">
I don`t know how to configure the "virtual host" and if it is possible.
Note: The "virtual hosts" should not be associated to a host (if it was
possible)</span></font></div>
<div> </div>
<div><font face="Arial" color="#0000ff" size="2"><span class="037330616-09052003">
Do you understand what I mean by virtual host now??</span></font></div>
<div> </div>
<div><font face="Arial" color="#0000ff" size="2"><span class="037330616-09052003">
thanks a lot.</span></font></div>
<div> </div>
<div> </div>
<div> </div>
<div><font face="Arial" color="#0000ff" size="2"> </font><font face="Tahoma" size="2">
-----Mensaje original-----<br>
<b>De:</b> Jason Lancaster [<a class="moz-txt-link-freetext" href="mailto:jlancaster@affinity.com">mailto:jlancaster@affinity.com</a>]<br>
<b>Enviado el:</b> viernes, 09 de mayo de 2003 17:47<br>
<b>Para:</b> Miguel A. Torres; <a class="moz-txt-link-abbreviated" href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>
<b>Asunto:</b> Re: [Nagios-users] Virtual Services???<br>
<br>
</font></div>
</span></div>
</div>
</span></div>
<blockquote dir="Ltr" style="margin-right: 0px; ">
<div><font face="Arial" size="2">I'm not really understanding what
you mean by a virtual service. What I was able to get out of this email
was that you want to define a service such as check_http to check the
same "host" multiple times, for example:</font></div>
<div> </div>
<div><font face="Arial" size="2">define service{</font></div>
<div><font face="Arial" size="2"> host_name <a href="http://www.domain.com">
www.domain.com</a>
<br>
service_description HTTP check</font></div>
<div><font face="Arial" size="2">}</font></div>
<div> </div>
<div><font face="Arial" size="2">...but have this issue it's results
to more than one host. If you try and define that service to check host
<a href="http://www.domain.com">www.domain.com</a>
twice, you will get an error. Therefore, you need 2 hosts defined in
your hosts.cfg like:</font></div>
<div> </div>
<div><font face="Arial" size="2">define host{<br>
host_name <a href="http://www.domain.com.internal">www.domain.com.internal</a>
<br>
address 127.0.0.1<br>
}</font></div>
<div> </div>
<div>
<div><font face="Arial" size="2">define host{<br>
host_name <a href="http://www.domain.com.virtual">www.domain.com.virtual</a>
<br>
address 127.0.0.1<br>
}</font></div>
<div> </div>
<div><font face="Arial" size="2">Then define a service to check_http
for each of these hosts, and you'll be ok. Just make sure check_http
uses the ip address and not the hostname.</font></div>
</div>
<div><font face="Arial" size="2">
<div> </div>
<div><font face="Arial" size="2">define service{</font></div>
<div><font face="Arial" size="2"> host_name <a href="http://www.domain.com.internal">
www.domain.com.internal</a>
<br>
service_description HTTP check</font></div>
<div><font face="Arial" size="2">}</font></div>
<div> </div>
<div>
<div><font face="Arial" size="2">define service{</font></div>
<div><font face="Arial" size="2"> host_name <a href="http://www.domain.com.virtual">
www.domain.com.virtual</a>
<br>
service_description HTTP check</font></div>
<div><font face="Arial" size="2">}</font></div>
</div>
</font></div>
<div> </div>
<div><font face="Arial" size="2">Hope this helps!</font></div>
<div> </div>
<div><font face="Arial" size="2">-Jason</font></div>
<blockquote dir="Ltr" style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left-width: 2px; border-left-style: solid; border-left-color: rgb(0,0,0); margin-right: 0px; ">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none; ">
----- Original Message ----- </div>
<div style="background-color: rgb(228,228,228); background-image: none; background-repeat: repeat; background-attachment: scroll; -x-background-x-position: 0%; -x-background-y-position: 0%; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none; "><b>
From:</b><a title="matorres@prisacom.com" href="mailto:matorres@prisacom.com">
Miguel A. Torres</a>
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none; "><b>
To:</b><a title="nagios-users@lists.sourceforge.net" href="mailto:nagios-users@lists.sourceforge.net">
nagios-users@lists.sourceforge.net</a>
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none; "><b>
Sent:</b> Friday, May 09, 2003 10:40</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none; "><b>
Subject:</b> [Nagios-users] Virtual Services???</div>
<div><br>
</div>
<!-- Converted from text/rtf format -->
<p><font face="Arial" size="2">Hello,</font></p>
<p><font face="Arial" size="2">I'm configuring nagios to monitoring
a lot of services. I need to group many services in a "Virtual service"
who it is not associated to a host. For example:</font></p>
<p><font face="Arial" size="2">I have 3 machines with webs servers,
so I have configured 3 independent services associated with it`s respective
host. Now I want to configure a "virtual service" who include those
3 services. I have been reading all the documentation for nagios and
I don`t find how can I make it. </font></p>
<p><font face="Arial" size="2">My question is: Is it possible
with nagios?</font></p>
<p><font face="Arial" size="2">Thanks and excuse my poor english.</font></p>
</blockquote>
</blockquote>
</blockquote>
<p>DISCLAIMER:<br>
This message contains information that may be privileged or confidential
and is the property of the Roxar Group. It is intended only for the person
to whom it is addressed. If you are not the intended recipient, you are not
authorised to read, print, retain, copy, disseminate, distribute, or use
this message or any part thereof. If you receive this message in error, please
notify the sender immediately and delete all copies of this message.</p>
</blockquote>
<br>
<pre class="moz-signature" cols="$mailwrapcol">--
Russell Scibetti
Quadrix Solutions, Inc.
<a class="moz-txt-link-freetext" href="http://www.quadrix.com">http://www.quadrix.com</a>
(732) 235-2335, ext. 7038
</pre>
<br>
</body>
</html>