I am working on sending some custom notification emails via a Powershell script. During this process I ran into some problems as I could not easily identify what the Placeholder values would be when they were passed from the Notification trigger to my Notification template to run the script.
For example I did some mock ups of my script on a Windows Audio Service sensor which I could stop and start so the state sensor on the down event would kick off the script. When doing this the Placeholder value of %host was the name of my server. However when I moved this over to a Cisco router on a Ping sensor the %host Placeholder value changed to the IP Address of the device and was not the name of the Device.
So here is my question: Is there an easier way to verify what value will come across when using Placeholders from the PRTG console? If not are you able to integrate this into PRTG in a future release?
Thanks in advance!
Article Comments
Hello Erhard,
Yes I am familiar with https://https://helpdesk.paessler.com/en/support/solutions/articles/76000063844. I guess I will take that as a "No there is not an easier way to find the values." I was looking more for a comprehensive list on one specific place within the PRTG device that had the static values like %host, %device, %deviceid, %group, %groupid, ect...
Thanks for the response!
Mar, 2019 - Permalink
Hi there,
You could run an export of all devices to xml to verify what's configured on each of them. When logged in to the webinterface, use this url:
https://your.prtg.server/api/table.xml?content=devices&output=xml&columns=objid,probe,group,device,host,baselink&count=*
This will result in an xml that you can open in Excel directly with an overview of all devices, their names and what's confiured as "host".
Kind regards,
Erhard
Mar, 2019 - Permalink
Hi there,
Check what you have configured in field "IPv4 Address/DNS Name" on "Settings" tab of the regarding devices, this should be what placeholder "%host" pulls.
Kind regards,
Erhard
Mar, 2019 - Permalink