I am calling a notification template for testing with the newest version of PRTG (now is November 2019). A batch file is called which looks like this:

rem Call_telegram_sender.bat
c:\somepath\send_to_telegram.exe %1

The notification "Telegram-Post" in PRTG is defined like this:

  • Execute Program
  • Programm File: Call_telegram_sender.bat
  • Parameters: %device

When clicking on "the bell" to test the notification template the batch file gets executed well and I am getting a message through telegram instant messaging service. But the Parameter is not resolved. I get the message: %device (percent-d-e-v-i-c-e)

I tried all this parameters:

  • %device --> leads to: %device
  • $device --> leads to: $device
  • %DEVICE --> leads to: %DEVICE
  • %%device --> leads to: %%device
  • %%%device --> leads to: %%%device
  • foo-%device --> leads to: foo-%device
  • "foo-%device" --> leads to: foo-%device
  • 'foo-%device' --> leads to: 'foo-%device'

It seems to like there is no resolution of variables


Article Comments

Hi Richard,

That's ok, when issuing a test, placeholders are not resolved. If you like to perform a real world test, right-click on a sensor in device tree where this notification template is in place and use "Simulate Error", then the placeholders will be filled accordingly.

See also this post about sending notifications to telegram.

Kind regards,

Erhard


Nov, 2019 - Permalink

Thanks for your reply, it would be great if PRTG would give a hint for that. After clicking "the bell" there is a modal window which gives hints:

+++ PRTG will attempt to deliver a test notification. Recipient information for user accounts is shown for the notification methods Send Email, Send Push Notification, and Send SMS/Pager Message. If the attempt is successful, the test notification will reach you shortly. For troubleshooting, please see the log entries under Logs | System Events | Notifications in the main menu bar of the PRTG web interface. +++

Greetings, Richard


Nov, 2019 - Permalink