builtin:service-detection-rules)
Define rules to detect and name services based on resource attributes defined in the Semantic Dictionary and custom attributes. Rules are evaluated in order and the first matching rule applies.
Schema ID | Schema groups | Scope |
---|---|---|
builtin:service-detection-rules |
| CLOUD_APPLICATION_NAMESPACE - Kubernetes namespaceKUBERNETES_CLUSTER - Kubernetes clusterHOST_GROUP - Host Groupenvironment |
GET | Managed | https://{your-domain}/e/{your-environment-id}/api/v2/settings/schemas/builtin:service-detection-rules |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/v2/settings/schemas/builtin:service-detection-rules | |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/v2/settings/schemas/builtin:service-detection-rules |
To execute this request, you need an access token with Read settings (settings.read
) scope. To learn how to obtain and use it, see Tokens and authentication.
Property | Type | Description | Required |
---|---|---|---|
Enabledenabled | boolean | If enabled, the rule will be evaluated. | required |
Rulerule | Rule | - | required |
Rule
objectProperty | Type | Description | Required |
---|---|---|---|
Rule nameruleName | text | - | required |
Descriptiondescription | text | - | optional |
Matching conditioncondition | text | Limits the scope of the service detection rule using DQL matcher conditions on resource attributes. A rule is applied only if the condition matches, otherwise the ruleset evaluation continues. If empty, the condition will always match. | optional |
Service name templateserviceNameTemplate | text | Specify resource attribute placeholders in curly braces, e.g. {service.name} or {k8s.workload.name}. All attributes used in the placeholder are required for the rule to apply. If any of them is missing, the rule will not be applied and ruleset evaluation continues. All resolved attribute values contribute to the final service ID. | required |
Additional service detection attributesadditionalRequiredAttributes | set | Add resource attribute keys (e.g. service.namespace or k8s.workload.kind) that also detect unique services but are not included in the displayed service name. Attributes specified here are required to apply the rule. If any of them is missing, the rule will not be applied and ruleset evaluation continues. All attribute values contribute to the final service ID. | required |