need expert advice/suggestions
MAHESH, SIDDACHETTY M (SIDDACHETTY M)
smahesh at alcatel-lucent.com
Mon Dec 7 06:36:44 CET 2009
Hi list,
I am trying out Nagios v3. I followed the documentation and it was easy getting the system up and running.
Now that the base system is working as expected, I am trying to improve the configuration to avoid duplication of information using templates and clean up the configuration. So, I would like your feedback/suggestions on my approach.
Let me explain the scenario. I have multiple hosts that can run a combination of applications. Each application can have one or more services associated with it.
My idea is as follows:
1. Each application is mapped to a service group template (APP_xyz_SVC_GRP. The services in that application are associated with that application service group.
define servicegroup {
servicegroup_name APP_xyz_SVC_GRP
register 0
}
define service {
name SSH
use generic-service
servicegroups APP_xyz_SVC_GRP
service_description SSH
check_command check_ssh
register 0
}
These application level templates do not change often.
2. Each host has a service group associated with it that is based on the actual applications installed on that host. The host.cfg for that host looks like
define host {
use linux-server
host_name HOST_abc
address 10.10.10.10
hostgroups HOSTGROUP_123
}
define servicegroup {
servicegroup_name HOST_abc_SVCS
servicegroup_members APP_xyz_SVC_GRP, APP_aaa_SVC_GRP, APP_bbb_SVC_GRP
}
The list of hosts and applications are dynamic and can change over time.
1. The first problem I see is that the host.cfg requires the actual service definition - I cannot use the template service SSH directly. So, for each application service, I need to add the following lines to my host.cfg
define service {
use SSH
host_name HOST_abc
servicegroups HOST_abc_SVCS
}
Is there a solution that can avoid the above service redefinition?
2. servicegroup definition does not include a host_name or similar directive - that would have simplified adding all services in the servicegroup to a host. Is there a way to achieve this - this will resolve problem #1 above. Basically auto-instantiate (or register) the template services in a group with associated host.
Note that both the hosts and applications running on the hosts are dynamic. The applications are fixed - they are part of a limited set. The eventual end goal is to auto-generate the nagios configuration. For this, I need the basic building blocks in place.
In case someone has encountered this problem before and has a better solution/design, please let me know.
Thanks,
Mahesh
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
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