OneAgent version 1.237+
To monitor the availability of key processes on your hosts, you need to define monitoring rules. After you create a rule, when a matching process is missing on a host, Dynatrace issues an alerting event.
You can analyze the latest activity of the processes defined for process availability in the Process instance snapshots section on the host overview page.
You can create rules to apply at the environment, host group, and host levels. Lower-level rules override higher-level rules. For example, a rule created on the host level overrides a rule with the same name created on the environment level.
Go to the Process availability page for the level on which you want the rule to apply:
https://your-environment/ui/settings/HOST_GROUP-NAME
and select Process availability.On the Process availability page, select Add monitoring rule. Process availability can comprise multiple individual detection rules. A process is identified if all of the individual detection rules match.
In Monitoring rule name, enter the name under which the rule will be listed.
Under Operating system (OneAgent version 1.287+), select the operating systems on which the monitoring rule should be applied. You can select more than one.
Set Minimum number of matching processes (OneAgent version 1.287+) to the minimum number of processes that should match this rule. If fewer processes match this rule, an alert is triggered.
Select Add detection rule to define a detection rule.
Remember that a single monitoring rule can have multiple detection rules. If you add more than one detection rule, a process is identified if all the detection rules match (AND relation).
Rule scope—Your selection of Process or Host determines the subsequent configuration details. Expand below for more.
Select process property—The object against which your detection rule will be tested:
Condition—Depending on what you want your rule to match, you can define a string that uses:
$contains
matches if the property contains the specified value. For example, $contains(keepalived)
matches if keepalived
occurs anywhere in the property.$eq
matches if the property exactly matches the specified value. For example, $eq(-d)
matches if -d
exactly matches the property.$prefix
matches if the property starts with the specified value. For example, $prefix(/usr/sbin/keepalived)
matches a property that starts with /usr/sbin/keepalived
.$suffix
matches if the property ends with the specified value. For example,$suffix(keepalived)
matches a property that ends with keepalived
.OneAgent version 1.287+
Custom metadata is 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.
Key specifies the metadata key you want to match
Condition in which you can define a string that:
$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.Escape special characters: When including special characters such as (
and )
within your matching expressions, escape these characters with a tilde ~
. For example, to match the metadata value my(amazing)property
, enter $eq(my~(amazing~)property)
.
If you need to add another detection rule to this monitoring rule, repeat the previous step.
Select Add property (OneAgent version 1.249+ Dynatrace version 1.249+) to specify a custom key-value property for the event.
dt.
in the Key field for hints{
in the Value field for hintsExample custom message in the event details:
custom.message
The {dt.event.title} is on deployment version: {dt.event.deployment.version}
In this example, note that Value includes two placeholders:
{dt.event.title}
{dt.event.deployment.version}
The event name and deployment version values will be extracted when the rule is triggered. If the placeholder substitution fails, both the key and the value will be unavailable.
When you finish defining the monitoring rule, including all detection rules that are a part of the monitoring rule, select Save changes.
After you save your changes:
Monitoring rules are listed on the Process availability page. Each monitoring rule in turn contains a list of one or more detection rules.