This article applies as of PRTG 20
I want to use placeholders (variables) with PRTG when editing Notification Templates (email, SMS text messages, execute program, etc.), or in the Send Email options. What placeholders are available with PRTG Network Monitor?
Important:
The following article will no longer be updated. For up-to-date-information, see the PRTG Manual: List of Placeholders for Notifications and the respective section in the PRTG Desktop Manual.
PRTG placeholders overview
You can use the listed placeholders (variables) in different settings fields of a notification. For more details, see PRTG Manual: Account Settings—Notification Templates.
- Message or Content field of all notifications (where available)
- Subject field of email and ticket notifications
- Custom Content field if you send Text with custom content in email notifications
- Sender Name, Title, and Subtitle fields of Slack notifications
- Title and Subtitle fields of Microsoft Teams notifications
- Payload field of Execute HTTP Action notifications
- Parameters field of Execute Program notifications
Note: Exceptions in usage apply to the placeholders for syslogs and SNMP traps. These can be used in the Custom Content field of Send Email notifications only.
Other settings
- For a list of placeholders available in the EXE/Script sensor and other custom sensor settings, as well as for command-line parameters, see the More section below.
- For a list of placeholders available in the deprecated Windows Enterprise Console's tools settings, see the More section below.
Available placeholders for email options and notifications
Notes about placeholders:
- Placeholders are not case sensitive.
- Depending on where you use a placeholder in a notification, PRTG may resolve the placeholder differently. A resolved placeholder in the body of a notification, for example, can contain more information compared to when PRTG resolves the same placeholder in the subject of a notification. The reason for this is to save space in the subject.
- Placeholders in summarized notifications have limited functionality:
- The placeholders listed in the following table will not be replaced in the subject field of summarized notifications if there was more than one trigger evoked during the summarized time span.
Exceptions: The placeholders %sitename and %summarycount are always resolved in summarized notifications. - If there is only one event triggered during the time span you defined, PRTG will not send a summarized notification, but just a normal notification. A summarized notification requires at least two triggered events.
- The placeholders listed in the following table will not be replaced in the subject field of summarized notifications if there was more than one trigger evoked during the summarized time span.
Placeholder | Contains | Synonym | Version/Usage Comment |
---|---|---|---|
%colorofstate | Color of the current object status (HTML hex code) | Might not work in older versions | |
%company | Paessler's copyright string | ||
%comments | Comments entered for the sensor | %commentssensor | As of PRTG 15.4.21: resolved placeholders contain the heading Sensor Comments |
%commentssensor | Comments entered for the sensor | %comments | As of PRTG 15.4.21: resolved placeholders contain the heading Sensor Comments |
%commentsdevice | Comments entered for the parent device | As of PRTG 15.4.21: resolved placeholders contain the heading Device Comments | |
%commentsgroup | Comments entered for the parent group | As of PRTG 15.4.21: resolved placeholders contain the heading Group Comments | |
%commentsprobe | Comments entered for the parent probe | Available as of PRTG 12.4; as of PRTG 15.4.21: resolved placeholders contain the heading Probe Comments | |
%coverage | Covered time span | Might not work in older versions | |
%cumsince | Since when data has been accumulated | ||
%date | Event's date, in the PRTG core server system's timezone | ||
%datetime | Event's date and time, in the PRTG core server system's timezone | ||
%device | Name of the device in which the event was triggered | %server | |
%deviceid | ID number of the device in which the event was triggered | As of PRTG 7.3.2 | |
%down | Time the item was down | ||
%downtime | Accumulated downtime | ||
%elapsed_lastcheck | Elapsed time since the sensor's last scan | As of PRTG 20.1.57 | |
%elapsed_lastdown | Elapsed time since the sensor last showed a Down status | As of PRTG 20.1.57 | |
%elapsed_lastup | Elapsed time since the sensor last showed an Up status | As of PRTG 20.1.57 | |
%group | Group in which the event was triggered | ||
%groupid | ID number of the group in which the event was triggered | As of PRTG 7.3.2 | |
%history | History of sensor events | ||
%home | PRTG web server URL | ||
%host | IP or DNS name of the device that triggered the event | Can be used as Agent IP in SNMP trap notifications sent by PRTG (as of PRTG 13.x.7) | |
%iconofstate | Filename incl. extension of the icon for the current object status | Might not work in older versions | |
%lastcheck | When was the sensor's last scan including time stamp | ||
%lastdown | When did the sensor last show a Down status, including time stamp | ||
%lastmessage | What message did the sensor send the last time | %message | |
%laststatus | Current sensor status | As of PRTG 20.1.57 | |
%lastup | When did the sensor last show an Up status, including time stamp | ||
%lastvalue | What value did the sensor send the last time | ||
%linkprobe | URL of the probe that triggered the event | Might not work in older versions | |
%linkgroup | URL of the group that triggered the event | Might not work in older versions | |
%linkdevice | URL of the device that triggered the event | Might not work in older versions | |
%linksensor | URL of the sensor that triggered the event | Might not work in older versions | |
%location | Location of the device/server for which the event was triggered | ||
%message | Which message did the sensor send the last time | %lastmessage | |
%name | Name of the sensor that triggered the event (including sensor type) | %sensor | |
%nodename | Name of the node if in a cluster | Might not work in older versions | |
%objecttags | All tags of a sensor | Available as of PRTG 20.1.56 | |
%parenttags | All tags of a sensor's parent objects | Available as of PRTG 20.1.56 | |
%prio | Sensor priority setting | %priority | |
%priority | Sensor priority setting | %prio | |
%probe | Probe under which the event was triggered | ||
%probeid | ID number of the probe under which the event was triggered | As of PRTG 7.3.2 | |
%programname | PRTG official name | ||
%programversion | PRTG program version | ||
%sensor | Name of the sensor that triggered the event (including sensor type) | %name | |
%sensorid | ID number of the sensor that triggered the event | As of PRTG 7.3.2 | |
%server | Name of the device under which the event was triggered | %device | |
%serviceurl | Service URL configured for the device under which the event was triggered | As of PRTG 9.1 | |
%settings | Miscellaneous sensor settings, such as username for Windows, HTTP, POP3 credentials, etc | ||
%shortname | Name of the sensor that triggered the event | As of PRTG 7.1 | |
%since | Since when the current status is active | %statesince | |
%sitename | PRTG web server (computer) name | ||
%statesince | Since when the current status is active | %since | |
%status | Old sensor status and current sensor status | ||
%summarycount | Returns the number of events triggered during the defined time span | For summarized notifications only! | |
%syslogerrors | Max. last 20 syslog entries before the notification trigger | As of PRTG 14.x.10; works with Syslog Receiver sensors; can be used in the "message" part of Send Email notifications only! | |
%syslogmessages | Max. last 20 syslog entries before the notification trigger | As of PRTG 14.x.12; works with Syslog Receiver sensors; can be used in the "message" part of Send Email notifications only! | |
%syslogwarnings | Max. last 20 syslog entries before the notification trigger | As of PRTG 14.x.10; works with Syslog Receiver sensors; can be used in the "message" part of Send Email notifications only! | |
%systemdatetime | Date and time when the notification was sent, in the PRTG core server system's time zone | ||
%tags | All tags of a sensor and its parent objects | Available as of PRTG 20.1.56 | |
%time | Event's time, in the PRTG core server system's time zone | ||
%timezone | PRTG core server system's time zone name | ||
%toaddress | Address to which the notification was sent | ||
%traperrors | Max. last 20 SNMP trap entries before the notification trigger | As of PRTG 14.x.10; Works with SNMP Trap Receiver sensors; can be used in the "message" part of Send Email notifications only! | |
%trapmessages | Max. last 20 SNMP trap entries before the notification trigger | As of PRTG 14.x.12; works with SNMP Trap Receiver sensors; can be used in the "message" part of Send Email notifications only! | |
%trapwarnings | Max. last 20 SNMP trap entries before the notification trigger | As of PRTG 14.x.10; works with SNMP Trap Receiver sensors; can be used in the "message" part of Send Email notifications only! | |
%uptime | Accumulated uptime |
Example (with placeholders):
Date/Time: %datetime
Time zone: %timezone
================================================================
Sensor: %name
Priority: %priority
================================================================
Probe: %probe
Group: %group
Device: %device
Example (placeholders have been replaced):
Date/Time: 25.09.2018 08:57
Time zone: W. Europe Standard Time
================================================================
Sensor: PING 48 (PING)
Priority: *****
================================================================
Probe: Local probe
Group: Paessler Network
Device: Device 1 [Windows ]
Placeholders in PRTG Desktop
Placeholder | Contains |
---|---|
%id | The object's ID as shown in the page header on the object's details page |
%name | The object's Name |
%host | The sensor's or device's IP Address/DNS Name |
%message | The sensor's Last Message |
%value | The sensor's Last Result value |
%type | The sensor's Type |
More
- For a current list of placeholders available in EXE/Script and other custom sensors in your PRTG version, as well as placeholders for command-line parameters, see PRTG Manual: Custom Sensors. See How can I use the PRTG Application Programming Interface (API)?for more information.
- You need to escape placeholders that you use in the parameter field with quotes so that they can be correctly resolved from the command line.
- For a list of placeholders available in the deprecated Enterprise Console's tools settings, see PRTG Manual: Options—Device Tools
Notes
- In PRTG versions previous to 15.4.21, you could edit Email Options in the Notification Delivery settings ("System & Website" settings in previous versions). This option has been removed for the ease of use. PRTG uses default content in HTML email notifications as of version 15.4.21. You can still change the content of plain text emails in the email notification settings and also use placeholders here.
- The placeholder %state is deprecated as of PRTG version 16.x.24. Use %status instead, which has the same functionality.
Disclaimer:
The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.