hostgroups and service dependencies?

Assaf Flatto assaf.flatto at ssp-intl.com
Fri May 22 12:05:56 CEST 2009


The 53 second delay is natural - as nagios is calculating the dependencies and what it 
calls "circular dependencies " - meaning it check that the definition is correct and the logic you 
defined is fine .

the delay will be there as long as you have the dependencies - as you are adding more complexity to 
the nagios operations and work logic - so it takes more time to prepare and create 
the "understanding " of the logic and requirements.

creating 100 definitions of service dependencies will not reduce the calculation time , and will 
only make you have a more "mess" in the configuration , the way you set it up is correct , and more 
elegant to read and understand by the next guy that will need to take care of the system (if that 
ever happens ).

 

On Wednesday 20 May 2009 19:35:20 Frost, Mark {PBG} wrote:
> I'm just starting to get into service dependencies.  My problem is that
> I don't quite see how I can get around doing it individually for each
> and every service and host needed.
>
> An example is if I've got 100 Windows servers all configured to be part
> of a hostgroup.  Then I've got a
>
>
> 		define service {
> 		        hostgroup_name
> prod_windows_servers
> 		        service_description             NRPE Service
> 		        check_command                   NRPE Service
> 		        use                             Production
> Windows Service
> 		}
>
> 		define service {
> 		        hostgroup_name
> prod_windows_servers
> 		        service_description             CPU Load
> 		        check_command
> check_windows_load!90%!90%
> 		        use                             Production
> Windows Service
> 		}
>
> 		define service {
> 		        hostgroup_name
> prod_windows_servers
> 		        service_description             C: Drive
> 		        check_command
> check_windows_disk!C:!90%!90%
> 		        use                             Production
> Windows Service
> 		}
>
> where the 100 servers are all part of the 'prod_windows_servers"
> hostgroup.  Here I can list the checks nice and compactly and add new
> hosts/checks merely by putting them in that hostgroup.
>
> I would like to make service checks on these boxes dependent on the
> "NRPE Service" check above.  So if the NRPE service was not responding,
> Nagios wouldn't bother sending me alerts about all the other things on
> that box it could not reach.
>
> The object definitions seem to say that I can do
>
> 		define servicedependency {
> 		        hostgroup_name
> prod_windows_servers
> 		        service_description             NRPE Service
> 		        dependent_hostgroup_name
> prod_windows_servers
> 		        dependent_service_description   C: Drive
> 		        execution_failure_criteria      n
> 		        notification_failure_criteria   w,u,c
> 		}
>
> I'm assuming that this is supposed to match up each
> 'prod_windows_servers' entry with its matching entry rather than making
> each server dependent on this servers from *every* other hostgroup
> member?
>
> Just to see, I tried this out and when I did a pre-flight check it took
> 53 seconds (checking the host and service dependencies) when it normally
> runs instantly.
>
> I'm not sure this does what I want.  Even so, I don't know that I can
> handle the 53 second wait which I imagine would escalate for each
> service I defined in this way).  The only other route I can think of is
> to create a unique servicedepency definition for each of these.  That's
> 100 x n dependency definitions, where n is the number of other services
> I'm checking on each of these boxes.
>
> Am I looking at this the wrong way?  Is there an easier way to do this?
>
> Thanks
>
> Mark
>
>
> ---------------------------------------------------------------------------
>--- Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables
> unlimited royalty-free distribution of the report engine
> for externally facing server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> 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



-- 
Assaf Flatto
SSP Ops Team
Linux System Administrator
169 Euston Road, London, NW1 2AE

Along with a few colleagues I am doing The Three Peaks Challenge again 
this year to raise money for The Railway Children.
Please sponsor me by making a donation online, simply click on the link 
below and give via your switch/credit card. Thank you.
http://www.justgiving.com/londonnorththreepeaks




IMPORTANT . this email and the information in it may be confidential, legally
privileged and/or protected by law. It is intended solely for the use of the
person to whom it is addressed. If you are not the intended recipient, please
notify the sender immediately and do not disclose the contents to any other
person, use it for any purpose, or store or copy the information in any medium.
Please also delete all copies of this email and any attachments from your
system.

We cannot guarantee the security or confidentiality of email communications. We
do not accept any liability for losses or damages that you may suffer as a
result of your receipt of this email including but not limited to computer
service or system failure, access delays or interruption, data non-delivery or
mis-delivery, computer viruses or other harmful components.

Copyright in this email and any attachments belong to Select Service Partner UK
Limited. Should you communicate with anyone at Select Service Partner UK Limited by
email, you consent to us monitoring and reading any such correspondence.

Nothing in this email shall be taken or read as suggesting, proposing or
relating to any agreement concerted practice or other practice that could
infringe UK or EC competition legislation.

Select Service Partner UK Limited is a company registered in England and Wales
(company number 05687183) whose registered office is at 1 The Heights, Brooklands, Weybridge. Surrey. KT13 0NY
 
 

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
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