Import apply rules

Hi,
When I try to create a import source in director I can create service, service set and service group but I can’t service apply.
Are there any way to import service apply rules?
Why there are not this option in import source?

Thanks in advance and best regards,
Emilio J.

An apply rule would be the same object but object_type set to apply, but be careful with service apply rules as they are not unique objects. This will give you recreate problems. I workaround this with service sets having the assign rule and then import the services to the service_set.

Sorry but I don’t understand how you can do a Apply For with a Service set

You are in true, apply rule is a special type of service. But I get this error:
I can only assign for applied objects or objects with native support for assigments, got object

When I add a Sync properties for assign_filter

You are correct Apply For is not possible for a Service Set, but I always try to avoid it with the Director.

Can you post a list of the properties of the object? To create a service apply you have to set at least:

I don’t undertand why the assign filters you get (by API or WEB download as JSON) are not valid when you try to import

In the other hand, do you has any workaround you can share in order to avoid apply rules?

My workaround is to create a Service Set and add the imported Services to it. So I have the assign rule on the Service Set (which could also be created by Import/Sync) and can simply create Services as objects.

Works pretty well for my use cases and is a clear configuration.

Thanks Dirk.
Only to double check I undertand correcly since you don’t use “apply for” if you what to check serveral instances, for example several apache, your service must be aware that must check serveral instances

Yes, I try to build it more in a way similar to this with multiple service sets:

  • Apache Default - assigned to all Apache Systems - containing default checks like service status, port 80 check, …
  • Apache SSL - assigned to All Apache Systems with SSL - checks like port 443, certificate, …
  • Apache FeatureA - additionally assigned to all where Feature A is used
  • Apache FeatureB - additionally assigned to all where Feature B is used
  • Apache ApplicationX - additionally assigned to all where Application X is used
  • Apache ApplicationY - additionally assigned to all where Application Y is used
  • Apache Port### - assigned where Apache runs on an additional port without a specific application

This should show the logic and is of course not a real world example, but I hope it is understandable. In some cases it is more complicated to build this logic then simply having an array and an apply for rule. But using the Director my goal is typically not the most simple but the most readable configuration.

And having a Serviceset, which has all the parts in its name a colleague or in my case a customer will likely search for, will result in him finding the set when he needs to add a service to it instead of creating a new one.