Closing hosts with services?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
epx998
Posts: 31
Joined: Mon Nov 21, 2011 3:51 pm

Closing hosts with services?

Post by epx998 »

Hi All,

I have been attempting to find the best way to clone a host along with its attached services. Basically copying the host and services, giving it a new host name. This would greatly help deploying monitoring for our large clusters. Is this where creating a 'template' would be used? I tinkered with templates and the 'copy' feature in Nagios Core, but all it did was duplicate the host, none of its services.

Cheers,

Gavin
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Closing hosts with services?

Post by jsmurphy »

All of this is going to depend on the way in which you have set up the inheritance... My usual approach is to tie all services to a service group or host group and have that flow down to the host for example:
I might have one host group windows-servers and another exchange-servers. Any service that will be related to all windows-servers I will assign to that hostgroup in the service definition... and the same again for exchange servers.

So when I create an exchange server host definition it will inherit both the windows-servers and the exchange-servers host groups. This has the two distinct advantages the first is I can update all windows-servers with new checks (or remove them) with one assignment the other is when I clone an exchange server the definitions will be persistent on both because I have assigned the host groups from the host definition.

You can also use templates to achieve the same thing... there's 10 different ways to skin a cat you just have to pick the one that's easiest for you to manage.
epx998
Posts: 31
Joined: Mon Nov 21, 2011 3:51 pm

Re: Closing hosts with services?

Post by epx998 »

Yeah that is just awesome. I have 15 servers in a cluster that have about 30 identical tests. I create each test once and assign it to a hostgroup and each node inherits the test. Much happiness. Thanks for pointing that out.

Cheers!
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Closing hosts with services?

Post by jsmurphy »

You're most welcome :D
Locked