Stuck... Object Tricks turning into Object Failures...
John Cavanaugh
cavanaughwww at hp.com
Fri Sep 4 19:11:00 CEST 2009
I have been really trying to exploit the benefits of inheritance etc with my
config files. I have created several templates that I use to sort of build
up a host config. Things have been working fine as part of my testing
with everything going to nagiosadmin, but as I started to segment things for
different subgroups of admins things have fallen apart.
Here is a snippet from my configs for reference.
define host{
name windows-server ; The name of this host
template
use generic-host,host-pnp ; Inherit default
values from the generic-host template
check_period 24x7 ; By default, hudson servers
are monitored round the clock
check_interval 10 ; Actively check the server
every x minutes
retry_interval 1 ; Schedule host check
retries at x minute intervals
max_check_attempts 10 ; Check each server x times
(max)
check_command check-host-alive ; Default command to
check if servers are "alive"
notification_period 24x7 ; Send notification out at
any time - day or night
notification_interval 60 ; Resend notifications every
x minutes
notification_options d,r ; Only send notifications
for specific host states
contact_groups +admins ; Notifications get sent to
the admins by default
hostgroups +windows-servers ; Host groups that Windows
servers should be a member of
register 0 ; DONT REGISTER THIS - ITS
JUST A TEMPLATE
}
define host{
name hudson-server ; The name of this host
template
use windows-server ; Inherit default values
from the generic-host template
contact_groups +hudsonadmins ; Notifications get sent to
the admins by default
hostgroups +hudson-servers ; Host groups that Windows
servers should be a member of
register 0 ; DONT REGISTER THIS - ITS
JUST A TEMPLATE
}
define service{
use remote-service
hostgroup_name windows-servers
service_description NSClient++ Version
normal_check_interval 60
notification_interval 0
check_command check_nrpe_1arg!CheckVersion
}
define service{
use remote-service
hostgroup_name hudson-servers
contact_groups hudsonadmins
service_description Hudson Server
check_command check_nrpe!checkServiceState!ShowAll hudson
}
define host{
use hudson-server,esx-datacenter1-vm ; Inherit
default values from a template
host_name sandbox ; The name we're giving to this host
alias sandbox ; A longer name associated with the host
_ESXVMNAME hudsonyyy ;
address xxxxx ; IP address of the host
}
All in all this works pretty effectively. In the above example bld-sandbox
belongs to multiple host groups, it's in windows-servers, hudson-servers and
host group for a specific vmware datacenter. I can list generic
windows-servers services that get inherited by all windows machines. But I
can also add additional services as needed like monitoring Hudson.
The problem arises in that I want *all* of the service alerts for a
hudson-server host to go to the hudsonadmins. I cant figure out how to
make the services defined by windows-servers to send email to the
hudsonadmins. I know I could just cut & paste all the services in
windows-servers and add the specifc contact_groups, but that just seems
broken.
Im sure Im missing something here, any ideas on how to put the pieces back
together for this?
--
John Cavanaugh
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
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