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.
PlaceholderContainsSynonymVersion/Usage Comment
%colorofstateColor of the current object status (HTML hex code)Might not work in older versions
%companyPaessler's copyright string
%commentsComments entered for the sensor%commentssensorAs of PRTG 15.4.21: resolved placeholders contain the heading Sensor Comments
%commentssensorComments entered for the sensor%commentsAs of PRTG 15.4.21: resolved placeholders contain the heading Sensor Comments
%commentsdeviceComments entered for the parent deviceAs of PRTG 15.4.21: resolved placeholders contain the heading Device Comments
%commentsgroupComments entered for the parent groupAs of PRTG 15.4.21: resolved placeholders contain the heading Group Comments
%commentsprobeComments entered for the parent probeAvailable as of PRTG 12.4;
as of PRTG 15.4.21: resolved placeholders contain the heading Probe Comments
%coverageCovered time spanMight not work in older versions
%cumsinceSince when data has been accumulated
%dateEvent's date, in the PRTG core server system's timezone
%datetimeEvent's date and time, in the PRTG core server system's timezone
%deviceName of the device in which the event was triggered%server
%deviceidID number of the device in which the event was triggeredAs of PRTG 7.3.2
%downTime the item was down
%downtimeAccumulated downtime
%elapsed_lastcheckElapsed time since the sensor's last scanAs of PRTG 20.1.57
%elapsed_lastdownElapsed time since the sensor last showed a Down statusAs of PRTG 20.1.57
%elapsed_lastupElapsed time since the sensor last showed an Up statusAs of PRTG 20.1.57
%groupGroup in which the event was triggered
%groupidID number of the group in which the event was triggeredAs of PRTG 7.3.2
%historyHistory of sensor events
%homePRTG web server URL
%hostIP or DNS name of the device that triggered the eventCan be used as Agent IP in SNMP trap notifications sent by PRTG (as of PRTG 13.x.7)
%iconofstateFilename incl. extension of the icon for the current object statusMight not work in older versions
%lastcheckWhen was the sensor's last scan including time stamp
%lastdownWhen did the sensor last show a Down status, including time stamp
%lastmessageWhat message did the sensor send the last time%message
%laststatusCurrent sensor statusAs of PRTG 20.1.57
%lastupWhen did the sensor last show an Up status, including time stamp
%lastvalueWhat value did the sensor send the last time
%linkprobeURL of the probe that triggered the eventMight not work in older versions
%linkgroupURL of the group that triggered the eventMight not work in older versions
%linkdeviceURL of the device that triggered the eventMight not work in older versions
%linksensorURL of the sensor that triggered the eventMight not work in older versions
%locationLocation of the device/server for which the event was triggered
%messageWhich message did the sensor send the last time%lastmessage
%nameName of the sensor that triggered the event (including sensor type)%sensor
%nodenameName of the node if in a clusterMight not work in older versions
%objecttagsAll tags of a sensorAvailable as of PRTG 20.1.56
%parenttagsAll tags of a sensor's parent objectsAvailable as of PRTG 20.1.56
%prioSensor priority setting%priority
%prioritySensor priority setting%prio
%probeProbe under which the event was triggered
%probeidID number of the probe under which the event was triggeredAs of PRTG 7.3.2
%programnamePRTG official name
%programversionPRTG program version
%sensorName of the sensor that triggered the event (including sensor type)%name
%sensoridID number of the sensor that triggered the eventAs of PRTG 7.3.2
%serverName of the device under which the event was triggered%device
%serviceurlService URL configured for the device under which the event was triggeredAs of PRTG 9.1
%settingsMiscellaneous sensor settings, such as username for Windows, HTTP, POP3 credentials, etc
%shortnameName of the sensor that triggered the eventAs of PRTG 7.1
%sinceSince when the current status is active%statesince
%sitenamePRTG web server (computer) name
%statesinceSince when the current status is active%since
%statusOld sensor status and current sensor status
%summarycountReturns the number of events triggered during the defined time spanFor summarized notifications only!
%syslogerrorsMax. last 20 syslog entries before the notification triggerAs of PRTG 14.x.10;
works with Syslog Receiver sensors; can be used in the "message" part of Send Email notifications only!
%syslogmessagesMax. last 20 syslog entries before the notification triggerAs of PRTG 14.x.12;
works with Syslog Receiver sensors; can be used in the "message" part of Send Email notifications only!
%syslogwarningsMax. last 20 syslog entries before the notification triggerAs of PRTG 14.x.10;
works with Syslog Receiver sensors; can be used in the "message" part of Send Email notifications only!
%systemdatetimeDate and time when the notification was sent, in the PRTG core server system's time zone
%tagsAll tags of a sensor and its parent objectsAvailable as of PRTG 20.1.56
%timeEvent's time, in the PRTG core server system's time zone
%timezonePRTG core server system's time zone name
%toaddressAddress to which the notification was sent
%traperrorsMax. last 20 SNMP trap entries before the notification triggerAs of PRTG 14.x.10;
Works with SNMP Trap Receiver sensors; can be used in the "message" part of Send Email notifications only!
%trapmessagesMax. last 20 SNMP trap entries before the notification triggerAs of PRTG 14.x.12;
works with SNMP Trap Receiver sensors; can be used in the "message" part of Send Email notifications only!
%trapwarningsMax. last 20 SNMP trap entries before the notification triggerAs of PRTG 14.x.10;
works with SNMP Trap Receiver sensors; can be used in the "message" part of Send Email notifications only!
%uptimeAccumulated 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

PlaceholderContains
%idThe object's ID as shown in the page header on the object's details page
%nameThe object's Name
%hostThe sensor's or device's IP Address/DNS Name
%messageThe sensor's Last Message
%valueThe sensor's Last Result value
%typeThe sensor's Type

More


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.