[Nagios-devel] Inheritance

Kashif Ali snake007uk at gmail.com
Sat Jan 6 00:25:43 UTC 2007


Hello All,

I was discussing a feature which would be cool to have for either
hostgroups.cfg or hosts.cfg. What i was thinking about was, allowing a user
to create a template which would then be used in a host/hostgroup, and then
a host/hostgroup could add to a value which it has already gained from the
template. Currently a value in the Father template can be overridden by a
child value, for example

Father {

hostgroup = group1
}

Child {
use Father
hostgroup = group 2
}

(Sorry i know this is correct syntax i just making up an example) Here the
child will only be a member of hostgroup "group2". What would be nice is if
you could do this

Child {
use Father
hostgroup = Father + group2
}

now the child host is part of group1 and group2. This allows a host to use a
single generic template and add extra needed only for itself rather creating
a how new template. The original overide rule applies where "+" isnt use to
add additonal value.

Another idea was to add groups within groups. The reason i would like to see
this feature is because currently we have five farms, (London - DL), (BL),
(New York -NY), Sydney (SY), and (PA). In each farm we have webservers, app
servers, db servers etc.... What i was trying to do was something like this.


ny-app={server list here}
ny-web={server list here}
.....
sy-app{server list here} and so... now i want another group called

all-app-servers={ny-app,sy=app......}

i also want like that for web

all-web-server{ny-web,sy-web...}

and i also want one called all servers in a particular Server Farm

ny-all-servers={ny-web,ny-app,ny-db}

and one final group

world-all-server{ny-all-servers,sy-all-server...}


You get the idea. With this i could do checks on groups based on World,
Farm, server-type, global-type-server etc.... currently i have to make
several groups add each server to each group manually, i thought idea about
adding values to templates would solve both problems.

I am currently using nagios 2.6 and i cant seem to find any other way around
this. If i am missing something please do let me know :)

Regards

Kashif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nagios.com/pipermail/nagios-devel/attachments/20070106/4e67a25f/attachment.html>


More information about the Nagios-devel mailing list