Hello Gleb, thank you for your inquiry.
There are 3 distinct ways to achieve what you desire:
1. Change Sensor's primary channel
Set the Packet Loss channel as primary. Then use the %lastvalue placeholder in notifications. A notification can only contain the value of the primary channel.
2. Create a Sensor Factory Sensor
Create a Sensor Factory Sensor which reads the value of any channel of the original sensor and displays it as primary channel. Configure the notification on the sensor factory sensor and use the %lastvalue placeholder. Fore more details on using the Sensor Factory Sensor please refer to this article.
3. Customize your script/exe notification
Even thought there are no placeholders for additional channel values in notifications, the triggered notification can query the HTTP API and get the data for additional channels.
The API query would be similar to this:
/api/table.xml?content=values&output=xml&columns=datetime,value_&count=1&id=2106 |
This returns the last reading of all sensors for a single sensor. For a ping sensor the XML result looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<values totalcount="576" listend="0">
<prtg-version>15.3.18.3616</prtg-version>
<item>
<datetime>01.09.2015 12:40:00 - 12:45:00</datetime>
<datetime_raw>42248.4479166667</datetime_raw>
<value channel="Ping Time" channelid="0">237 msec</value>
<value_raw channel="Ping Time" channelid="0">237.2800</value_raw>
<value channel="Minimum" channelid="1">237 msec</value>
<value_raw channel="Minimum" channelid="1">237.0000</value_raw>
<value channel="Maximum" channelid="2">240 msec</value>
<value_raw channel="Maximum" channelid="2">240.0000</value_raw>
<value channel="Packet Loss" channelid="3">0 %</value>
<value_raw channel="Packet Loss" channelid="3">0.0000</value_raw>
<value channel="Downtime" channelid="-4">0 %</value>
<value_raw channel="Downtime" channelid="-4">0.0000</value_raw>
</item>
</values>
You can find more details about PRTG's API here:
Add comment