Fwd: Multiple host in hosts.cfg

spdesai at gnvfc.net spdesai at gnvfc.net
Mon Nov 20 15:20:15 CET 2006


thanks for yr reply... 

what i want  to do is to reduce the typeing in hosts.cfg file but in  your 
suggestion also i need to difine individual hosts in hosts.cfg file.

is their any best way to do this

thanks and regardrs,
suhag


Quoting Thomas Sluyter <nagios at kilala.nl>:

> Hi all...
> 
> I know I'm getting back to this discussion quite late (I've had a  
> 2.5w vacation, hence my absence from the ML), but I thought I'd  
> contribute a little.
> 
> 
> On 9 Nov, 2006, at 12:32, Giles Coochey wrote:
> 
> >> -----Original Message-----
> >> From: spdesai at gnvfc.net [mailto:spdesai at gnvfc.net]
> >> Sent: 09 November 2006 12:16
> >> Subject: RE: [Nagios-users] Fwd: Multiple host in hosts.cfg
> >>
> >> I have found that we can add multiple host in hosts.cfg from
> >> below nagios FAQ,
> >>
> >> http://www.nagios.org/faqs/viewfaq.php?faq_id=146&expand=false
> >> &showdesc=false
> >
> > While you can use any string for the host address you can then only  
> > use
> > check plugins that will handle multiple addresses.
> > ...
> > To fix your problem with the SMTP service in particular would be to
> > write a wrapper script for the SMTP plugin to run it twice or more  
> > times
> 
> IMHO a better way is thusly:
> * Define all your hosts individually.
> * Create one service description for "SMTP".
> * Add the list of hosts to the "host" parameter of the service  
> description.
> 
> That way you won't need a wrapper and you're not mucking about with  
> address ranges.
> 
> An even better method would be:
> * Create a host group, for example "SMTP-hosts".
> * Create one service description for "SMTP".
> * Add the host group to the "hostgroup" parameter of the service  
> description.
> * "Subscribe" your hosts to the host group.
> 
> That way, adding new hosts to the service check is a cinch and you  
> won't have to repeatedly edit the service description itself. All you  
> do is add host group subscriptions to the hosts.
> 
> Naturally this idea can be carried through the whole of your  
> configuration, which makes for a wonderfully clear and transparent  
> configuration.
> 
> Cheers!
> 
> 
> Thomas
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting
> any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
> 




-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list