Fwd: Multiple host in hosts.cfg
Giles Coochey
GilesC at CarmenMedia.com
Thu Nov 9 12:32:16 CET 2006
> -----Original Message-----
> From: spdesai at gnvfc.net [mailto:spdesai at gnvfc.net]
> Sent: 09 November 2006 12:16
> To: Giles Coochey
> Cc: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] Fwd: Multiple host in hosts.cfg
>
> Hello
>
> thanks for your reply, let me clear that i have posted this
> messge today only once,
>
> now get back to the point,
>
> 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
>
>
Hi Suhag,
While you can use any string for the host address you can then only use
check plugins that will handle multiple addresses.
The SMTP plugin you are using does not seem to handle the comma
seperated list, hence your error.
The concept that a host is a host and not a network or subnet of hosts
still holds true.
In my opinion, Nagios is an open box of tricks, so it is very 'hackable'
as to what you can do. You will therefore see a lot of documentation and
tips about being able to do things in an unexpected way. You should bear
in mind that hacking around may lead you into problems that you will
generally have to solve yourself.
If you're not sure what's going on in the background then I would
recommend writing individual host definitions for your hosts and
generally keep to the examples and way of doing things that you see in
the example configuration files and other documentation.
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
(once for each host in the comma seperated list) and generate critical
errors when the service is down on all hosts and warnings when the
service is down on one or more hosts, or even generate perf data to say
how many hosts have the service up/down. Of course, that would just be
for one type of implementation and may not suit your needs.
How you do that is down to you, and there may well be tools to assist
you on www.nagiosexchange.org in that. However, you will not be able to
'just' add a PING or other service check to that host in the future, as
you have 'hacked' the address entry in the host definition to
specifically only work with your wrapper, or other plugins that support
that.
Hope that clarifies things a little.
Thanks
Giles
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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