Ticket #71 (reopened enhancement)

Opened 3 months ago

Last modified 2 months ago

Service Template addition/suppression in Host Template

Reported by: Getro Owned by: shotamchay
Priority: blocker Milestone: Centreon-2.1
Component: CentCore Version: beta5
Keywords: Cc:

Description

When I add a Service Template into a Host Template, no corresponding service is added to hosts using this Host Template.
It is possible to do it anyway thanks to the Massive Change feature of Host menu : I just have to reselect the Host Template and set Yes to the option "Create Services linked to the Template too". Usable.

The problem is when you want to suppress a Service Template from a Host Template. Even with the method above, no way to suppress the corresponding services. You have to delete these services manually for each hosts.

Painfull if you have hundred servers for which you made a mistake in the service templates / host template association.
Thx

Change History

Changed 3 months ago by dduponchelle

  • status changed from new to closed
  • resolution set to fixed

There isn't problem, it's the normaly method to create services linked.
Please upgrade your version and notify us if you will see others bugs!
Thanks for your contribution!

Changed 3 months ago by Getro

  • status changed from closed to reopened
  • version changed from beta3 to beta5
  • resolution deleted

I just upgraded to Beta 5.
You answer says it the method to CREATE services linked. OK.
But I'm looking for a way to massively SUPPRESS services from 100 hosts (for example) when these services where massively created by applying a Host Template which is itself associated to Service Templates, as I describe above. What is the reverse method ?
I think it could be an enhancement.
Thx,

Changed 3 months ago by shotamchay

  • owner set to shotamchay
  • status changed from reopened to assigned

i'm working on this deletion method.. hopefully it will be done very soon

Changed 3 months ago by shotamchay

Hi,

could you check out the revision r5744 and apply the changes?
if you wish to massively delete services that were created due to a host template association, simply delete the host template selection on your host configuration page.

the tests i made were quite light, if you could try it out troughoutly that would be much appreciated! :-)

Changed 3 months ago by Getro

Hi,
It is working fine and is a necessary feature. But it does not answer to the need I described. How to do the same deletion for several hosts in one shot ? Because when I try to apply your method massively to several hosts that where associated to a same host template, it is not possible because the template does not appear. So it is possible to massively associate a host template to several hosts but not the reverse. Then, the associated services won't be deleted.
Furthermore, would it not be possible to automatically propagate the change in the service template list of a host template to the hosts linked to that template ?

Example :
I have a host template "Windows-2k03", linked to 3 service templates "WMI-CPU", "WMI-DISK" and "WMI-MEMORY". I applied this template to 100 servers.
But Imagine I'm not interested anymore by disk space for Windows 2k03 servers. What would be great is that deleting the service template "WMI-CPU" from the host template "Windows-2k03" will cause the deletion of the service from the 100 servers.

By hoping it is clearer,
Br,

Changed 3 months ago by shotamchay

Hi,

I think I understand the problem. As for now, I don't think it's possible (the massive change way) to do it with the current structure of the database. When services are created and associated to a host, there is no way to figure out whether the service was added by the template generation process or manually.

This feature requires some development and lots of tests, we will think about including this in the future versions.

Changed 3 months ago by shotamchay

  • status changed from assigned to closed
  • resolution set to Not a bug

Changed 2 months ago by Getro

  • priority changed from minor to blocker
  • status changed from closed to reopened
  • resolution deleted

Hi again.
Thank you for your answer.
Tell me if I understand well : it is difficult for you to automatically propagate a change in a host template to hosts for which this template was used to create services, for the reasons you gave. Right. I understand that in a way, I'm asking for a reverse mechanism.

But I think it should be possible to select several hosts by using "Massive Change" and delete their common host templates. But when I try to do this, these common host templates does not appear and it is only possible to add a host template. In that case, we would use the normal mechanism you added as an enhancement (that is : host template deletion from a host cause the deletion of associated services from this host).
Without this, I have to go manually in my hundred hosts to delete the host template.

Changed 2 months ago by Getro

Hi everybody,

Any suggestions for this ?

Changed 2 months ago by jmathis

  • milestone changed from Centreon-2.0 to Centreon-2.1

Hi Gestro,

It's impossible to delete template like this. Massiv change can't do that. I think we have to create a "massiv Delete" option. Template of massiv change is not adapted for that.

We can plan to do that for centreon 2.1 but never for centreon 2.0. We have to stoppe developments. I think that many people wait this version. We are doing our best to develop many functionnalities but now we want to stabilise centreon 2.0.

And for all bugs you have open, just complete your profil in wiki (email in particular). We want to join you but we can't...

Changed 2 months ago by Getro

Thanks Julien

I understand your position. Will update my profile.

Note: See TracTickets for help on using tickets.