builtin:os-services-monitoring)
Set up alerts for OS services in undesirable states both for Windows and Linux systemd. Note: If monitoring is turned on for full availability metric, custom metric consumption takes place. Refer to documentation for more details.
Please provide feedback to us about this feature on Dynatrace Community.
In order to set up the alert for a certain group of OS services, you must first define a new policy. Specify which service's states you would like to be alerted about and then add detection rules in order to tell Dynatrace which exact OS services you are interested in. You may specify multiple detection rules.
Note that policies are specified for each of supported operating systems individually and that some of the parameters and properties vary between them.
builtin:os-services-monitoring
group:monitoring
HOST
- HostHOST_GROUP
- Host Groupenvironment
GET | Managed | https://{your-domain}/e/{your-environment-id}/api/v2/settings/schemas/builtin:os-services-monitoring |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/v2/settings/schemas/builtin:os-services-monitoring | |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/v2/settings/schemas/builtin:os-services-monitoring |
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.
enabled
system
WINDOWS
LINUX
name
monitoring
Toggle the switch in order to enable or disable availability metric monitoring for this policy. Availability metrics produce custom metrics. Refer to documentation for consumption examples. Each monitored service consumes one custom metric.
alerting
Toggle the switch in order to enable or disable alerting for this policy
notInstalledAlerting
By default, Dynatrace does not alert if the service is not installed. Toggle the switch to enable or disable this feature
statusConditionWindows
This string has to match a required format. See OS services monitoring.
$eq(paused)
– Matches services that are in paused state.Available logic operations:
$not($eq(paused))
– Matches services that are in state different from paused.$or($eq(paused),$eq(running))
– Matches services that are either in paused or running state.Use one of the following values as a parameter for this condition:
running
stopped
start_pending
stop_pending
continue_pending
pause_pending
paused
statusConditionLinux
This string has to match a required format. See OS services monitoring.
$eq(failed)
– Matches services that are in failed state.Available logic operations:
$not($eq(active))
– Matches services with state different from active.$or($eq(inactive),$eq(failed))
– Matches services that are either in inactive or failed state.Use one of the following values as a parameter for this condition:
reloading
activating
deactivating
failed
inactive
active
alertActivationDuration
The number of 10-second measurement cycles before alerting is triggered
Set this value to control the speed of alerting. One is the lowest setting equal to one 10-second sample. If you set this value to 30, alerting is triggered after 5 minutes.
metadata
Set of additional key-value properties to be attached to the triggered event.
windowsDetectionCondition
objectruleType
RuleTypeOsService
RuleTypeHost
property
DisplayName
ServiceName
Path
StartupType
Manufacturer
condition
This string has to match a required format. See OS services monitoring.
$contains(ssh)
– Matches if ssh
appears anywhere in the service's property value.$eq(sshd)
– Matches if sshd
matches the service's property value exactly.$prefix(ss)
– Matches if ss
matches the prefix of the service's property value.$suffix(hd)
– Matches if hd
matches the suffix of the service's property value.Available logic operations:
$not($eq(sshd))
– Matches if the service's property value is different from sshd
.$and($prefix(ss),$suffix(hd))
– Matches if service's property value starts with ss
and ends with hd
.$or($prefix(ss),$suffix(hd))
– Matches if service's property value starts with ss
or ends with hd
.Brackets ( and ) that are part of the matched property must be escaped with a tilde (~)
startupCondition
This string has to match a required format. See OS services monitoring.
$eq(manual)
– Matches services that are started manually.Available logic operations:
$not($eq(auto))
– Matches services with startup type different from Automatic.$or($eq(auto),$eq(manual))
– Matches if service's startup type is either Automatic or Manual.Use one of the following values as a parameter for this condition:
manual
for Manualmanual_trigger
for Manual (Trigger Start)auto
for Automaticauto_delay
for Automatic (Delayed Start)auto_trigger
for Automatic (Trigger Start)auto_delay_trigger
for Automatic (Delayed Start, Trigger Start)disabled
for DisabledlinuxDetectionCondition
objectruleType
RuleTypeOsService
RuleTypeHost
property
ServiceName
StartupType
condition
This string has to match a required format. See OS services monitoring.
$contains(ssh)
– Matches if ssh
appears anywhere in the service's property value.$eq(sshd)
– Matches if sshd
matches the service's property value exactly.$prefix(ss)
– Matches if ss
matches the prefix of the service's property value.$suffix(hd)
– Matches if hd
matches the suffix of the service's property value.Available logic operations:
$not($eq(sshd))
– Matches if the service's property value is different from sshd
.$and($prefix(ss),$suffix(hd))
– Matches if service's property value starts with ss
and ends with hd
.$or($prefix(ss),$suffix(hd))
– Matches if service's property value starts with ss
or ends with hd
.Brackets ( and ) that are part of the matched property must be escaped with a tilde (~)
startupCondition
This string has to match a required format. See OS services monitoring.
$eq(enabled)
– Matches services with startup type equal to enabled.Available logic operations:
$not($eq(enabled))
– Matches services with startup type different from enabled.$or($eq(enabled),$eq(disabled))
- Matches services that are either enabled or disabled.Use one of the following values as a parameter for this condition:
enabled
enabled-runtime
static
disabled
hostMetadataCondition
Host custom metadata refers to user-defined key-value pairs that you can assign to hosts monitored by Dynatrace.
By defining custom metadata, you can enrich the monitoring data with context specific to your organization's needs, such as environment names, team ownership, application versions, or any other relevant details.
MetadataItem
objectmetadataKey
Type 'dt.' for key hints.
metadataValue
Type '{' for placeholder hints.
HostMetadataCondition
objectkeyMustExist
When enabled, the condition requires a metadata key to exist and match the constraints; when disabled, the key is optional but must still match the constrains if it is present.
metadataKey
metadataCondition
This string has to match a required format.
$contains(production)
– Matches if production
appears anywhere in the host metadata value.$eq(production)
– Matches if production
matches the host metadata value exactly.$prefix(production)
– Matches if production
matches the prefix of the host metadata value.$suffix(production)
– Matches if production
matches the suffix of the host metadata value.Available logic operations:
$not($eq(production))
– Matches if the host metadata value is different from production
.$and($prefix(production),$suffix(main))
– Matches if host metadata value starts with production
and ends with main
.$or($prefix(production),$suffix(main))
– Matches if host metadata value starts with production
or ends with main
.Brackets ( and ) that are part of the matched property must be escaped with a tilde (~)