OS services monitoring
Dynatrace provides out-of-the-box availability monitoring of OS services.
Monitor a service
To monitor an OS service:
-
In Dynatrace, go to OS services monitoring for the level you are configuring.
Add service monitoring policy
Based on the service state and the rules, the service monitoring policy defines the way Dynatrace is monitoring your service. By default, Dynatrace comes with Auto-start Windows OS Services
and Auto-start Linux OS Services
policies for auto-started Windows and Linux services with failed status.
Note: The order of service monitoring policies is important. Policies that are higher on the list will proceed before those on lower positions until they are fulfilled. This allows for the creation of selective alerts or monitoring with minimal policies. If you want to monitor all auto-started services and not just those created by Microsoft, you need to add a policy with disabled alerting and/or monitoring that will verify if the manufacturer is Microsoft.
- On OS services monitoring for the level you are configuring based on your OS, select Add policy and define the policy, which is a collection of rules.
- System: select your operating system.
- Rule name: enter the name that will be displayed in the Summary field.
- Monitor: indicate whether you want to monitor service availability. Note that the service availability metric consumes DDUs. See DDU consumption.
- Alert: indicate whether you want alerting for your policy.
-
Service status: set the service status for which alert should be triggered. You can use logic operations to monitor the service status. For example,
$eq(running)
monitors the running service 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.
These are the service statuses you can monitor. Use one of the following values as a parameter for this condition:
running
stopped
start_pending
stop_pending
continue_pending
pause_pending
paused
-
Service status: set the service status for which an alert should be triggered. You can use logic operations to monitor the service status. For example,
$eq(active)
monitors the active service 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.
These are the service statuses you can monitor. Use one of the following values as a parameter for this condition:
reloading
activating
deactivating
failed
inactive
active
Next, you need to select which services you want to monitor based on service properties.
Select services you want to monitor
- Select Add rule and then select the service you want to monitor:
- Service property used for matching:
- Display name visible for system user.
- Path to the binary used by OS service.
- Manufacturer from the binary file of the service.
- Service Name
- Startup Type
- Service property used for matching:
Display name, Path, Manufacturer, Service Name
With these properties, we define the services to be monitored based on:
-
display name visible to a system user,
-
path to the service binary,
-
manufacturer of the service,
-
service name representing the name or ID under which OS service is recognized.
-
Condition in which you can define a string that:
- Starts with – use
$prefix
qualifier, for example$prefix(ss)
. - Ends with – use
$suffix
qualifier, for example$suffix(hd)
. - Equals – use
$eq
qualifier, for example$eq(sshd)
. - Contains - use
$contains
qualifier , for example$contains(ssh)
.
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
.
- Starts with – use
Startup Type
With this property we define the services to be monitored based on their startup type.
-
Condition in which you can define a string that:
- Equals – use
$eq
qualifier, for example$eq(manual)
.
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)
- Equals – use
- Select Add rule and then select the service you want to monitor:
- Service property used for matching:
- Service Name
- Startup Type
- Service property used for matching:
Service Name
With this property we define the services to be monitored based on the service name.
Condition in which you can define a string that:
$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
.
Startup Type
With this property, we define the services to be monitored based on their startup type.
Condition in which you can define a string that:
$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 | enabled via .wants/ , .requires/ or Alias= symlinks. |
static | the unit file is not enabled, and has no provisions for enabling in the install unit file section. |
disabled | the unit file is not enabled, but contains an install section with installation instructions. |
- Select Save changes.
Manage monitored OS services
To manage the OS services
-
In Dynatrace, go to OS services monitoring for the level you are configuring.
-
The OS services you monitor are displayed in a table under the Add policy button.
- To stop monitoring a listed service, turn the Enabled setting off.
- To delete a service from the table, select the delete button in the Delete column
- To view and edit details, select the expand control in the Details column.
Monitor service availability
Dynatrace 1.243+OneAgent 1.243+The Host overview page contains the OS services analysis section listing the OS services for which any policy (with active alerting or monitoring) is fulfilled.
- In the Dynatrace menu, go to Hosts.
- In the OS services analysis section, select the service name to open the Service overview page.
For more information, see Host performance monitoring with Dynatrace
Configure at scale using Settings API
You can use the Settings API to configure your service availability monitoring at scale.
- To learn the schema, use GET a schema with
builtin:os-services-monitoring
as the schemaId. - Based on the
builtin:os-services-monitoring
schema, create your configuration object. - To create your configuration, use POST an object.