Notification and Custom Action Placeholders
Using Ping Monitor, you can send email notifications when an alert is triggered or when a host's state or quality changes. You can also execute custom actions in response to alerts and events. These options can be configured on the Alerts and Notifications page in Preferences, where you specify which email notifications should be sent and which custom actions should be executed.
Notification templates and custom action parameters can include placeholders that are replaced with actual values when a notification is sent or an action is executed. This allows you to include context-specific information, such as the host name, alert details, or current host status, in notifications and custom actions.
Ping Monitor includes predefined email notification templates for alerts and different event types. These templates are available on the Notification Mail Templates page in Preferences and support context-specific placeholders appropriate for each notification type. Placeholders can also be used in custom actions and passed as command-line arguments to the executed program.
Different event types support different sets of placeholders. When configuring notifications or custom actions, use only the placeholders available for the selected event type. Placeholders that are not supported in the current context cannot be used.
A placeholder is a predefined string enclosed in "%" characters, such as %REMOTE_HOST%. Placeholders can be used in notification templates and custom actions to represent event- and alert-specific information. When a notification is sent or a custom action is executed, placeholders are replaced with the corresponding values.
Common Placeholders
The following placeholders provide information about the monitored host that generated an alert or event. They also include details about the machine where Ping Monitor is installed, as well as the date, time, and occurrence of the event or alert. These placeholders are available in all alert and event contexts.
Host placeholders |
|
%REMOTE_HOST% |
the remote host being monitored, including the host label, if defined; |
%REMOTE_HOST_ADDRESS% |
the address of the remote host being monitored; |
%REMOTE_HOST_GROUP% |
the group the remote host belongs to; |
%REMOTE_HOST_IP% |
the resolved IP address of the remote host; |
%REMOTE_HOST_LABEL% |
the label of the remote host being monitored; |
%REMOTE_HOST_DESCRIPTION% |
the description of the remote host being monitored; |
Occurrence placeholders |
|
%CHANGE_TIME% |
the date and time the connection change happened at; |
%OCCURRENCE% |
the number of notification sent for this event or alert (useful for recurring notifications); |
Local machine placeholders |
|
%LOCAL_HOST% |
the machine name where Ping Monitor server is running; |
%RUNNING_PRODUCT% |
the running program name; |
%PRODUCT_VERSION% |
the current version of the running program; |
Date and time placeholders |
|
%TIME% |
the current time; |
%DATE% |
the current date; |
%DATETIME% |
the current date and time; |
%UTC_OFFSET% |
the current UTC offset; |
%YEAR% |
the current year. |
On Alerts
The following placeholders can be used in notifications and custom actions when alerts occur or are resolved.
Placeholders available for alert occurrences and resolutions |
|
%ALERT_NAME% |
the name of the alert; |
%ALERT_SEVERITY% |
the severity of the alert; |
%ALERT_STATE% |
the current state of the alert: it can be either Occurred or Resolved; |
%ALERT_START% |
the start time of the alert; |
%ALERT_DURATION% |
the duration of the alert; |
Placeholders applicable to resolved alerts only |
|
%ALERT_END% |
the end time of the alert that has been resolved. |
On State Change Events
The following placeholders provide information about host state changes.
Placeholders applicable to both Up State and Down State events |
|
%STATE% |
the current host state, either Up or Down; |
%CONNECTION_STATUS% |
the current connection status. It can be either 'lost', or 'restored'. For the 'lost' status, the reason for ping failure is added. If you do not want to see the reason, use the '%SHORT_CONNECTION_STATUS%' placeholder; |
%SHORT_CONNECTION_STATUS% |
the current connection status. It can be either 'lost', or 'restored'. The reason for ping failure is never added; |
Placeholders applicable to Up State events only |
|
%OUTAGE_DURATION% |
the duration of the outage that has ended; |
%OUTAGE_START_TIME% |
the start time of the outage that has ended; |
%OUTAGE_END_TIME% |
the end time of the outage that has ended. |
On Connection Quality Change Events
The following placeholder provides information about connection quality changes and can be used in connection quality change events.
%QUALITY% |
the current connection quality, one of the following: Good, Warning, Bad or Critical. |