Skip to main content

Hello,

Is this possible to add a feature to delete the services not found by autodiscovery while initially created by it ? Basically, this option below in the autodiscovery rules with delete instead of disable.

As we have a several rules and a service can change rule perimeter, if it is disabled by its previous rule, it won’t be added by the new one as it is already existing in the configuration. Besides having a clearer configuration.

Thank you in advance.

I agree with this, but i have a doubt, as the machine that would be discovered will be added with a host template, the fact that services are created and disabled make so they are still linked to the template.

If the machine end up changing “perimeter”, then the host template would change and by re applying the “create service linked to host” then services would be replaced by the new ones.

Wouldn’t this match the behavior you described ? Maybe i didn’t understand your point.


I agree with this, but i have a doubt, as the machine that would be discovered will be added with a host template, the fact that services are created and disabled make so they are still linked to the template.

If the machine end up changing “perimeter”, then the host template would change and by re applying the “create service linked to host” then services would be replaced by the new ones.

Wouldn’t this match the behavior you described ? Maybe i didn’t understand your point.

 

Hello Alexandre,

The machine does not change perimeter nor host template, only the service have to change its service template. Since we can link only one service template to an autodisco rule, we have to set up several rules. But as it is the “old” rule that created the service, it does not find the service and then disable it as the “new” one cannot create it. The autodiscovery rules are in conflict between themselves in my case.


Hi ​@mikail Your problem is that a service discovered by one discovery rule cannot be manipulated by another one.

The problem with deleting a service if it isn't discovered by a rule is:
- the order of rule execution
- what if the service was simply unavailable at the time of discovery, destroying all associated data?


Hello ​@lpinsivy ,

For the first point I’d say the order of rule execution will be problematic only once logically, if it is deleted then it will be added at the next execution by only one rule.

For the second point, the choice remains to the user to whether it is an acceptable risk.