Settings API - OS services monitoring schema table
OS services monitoring (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 |
Authentication
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.
Parameters
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.
The windowsDetectionCondition
object
ruleType
RuleTypeOsService
RuleTypeHost
property
DisplayName
ServiceName
Path
StartupType
Manufacturer
condition
This string has to match a required format. See OS services monitoring.
$contains(ssh)
– Matches ifssh
appears anywhere in the service's property value.$eq(sshd)
– Matches ifsshd
matches the service's property value exactly.$prefix(ss)
– Matches ifss
matches the prefix of the service's property value.$suffix(hd)
– Matches ifhd
matches the suffix of the service's property value.
Available logic operations:
$not($eq(sshd))
– Matches if the service's property value is different fromsshd
.$and($prefix(ss),$suffix(hd))
– Matches if service's property value starts withss
and ends withhd
.$or($prefix(ss),$suffix(hd))
– Matches if service's property value starts withss
or ends withhd
.
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 Disabled
The linuxDetectionCondition
object
ruleType
RuleTypeOsService
RuleTypeHost
property
ServiceName
StartupType
condition
This string has to match a required format. See OS services monitoring.
$contains(ssh)
– Matches ifssh
appears anywhere in the service's property value.$eq(sshd)
– Matches ifsshd
matches the service's property value exactly.$prefix(ss)
– Matches ifss
matches the prefix of the service's property value.$suffix(hd)
– Matches ifhd
matches the suffix of the service's property value.
Available logic operations:
$not($eq(sshd))
– Matches if the service's property value is different fromsshd
.$and($prefix(ss),$suffix(hd))
– Matches if service's property value starts withss
and ends withhd
.$or($prefix(ss),$suffix(hd))
– Matches if service's property value starts withss
or ends withhd
.
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.
The MetadataItem
object
metadataKey
Type 'dt.' for key hints.
metadataValue
Type '{' for placeholder hints.
The HostMetadataCondition
object
keyMustExist
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 ifproduction
appears anywhere in the host metadata value.$eq(production)
– Matches ifproduction
matches the host metadata value exactly.$prefix(production)
– Matches ifproduction
matches the prefix of the host metadata value.$suffix(production)
– Matches ifproduction
matches the suffix of the host metadata value.
Available logic operations:
$not($eq(production))
– Matches if the host metadata value is different fromproduction
.$and($prefix(production),$suffix(main))
– Matches if host metadata value starts withproduction
and ends withmain
.$or($prefix(production),$suffix(main))
– Matches if host metadata value starts withproduction
or ends withmain
.
Brackets ( and ) that are part of the matched property must be escaped with a tilde (~)