What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Notification Template/EXE, Parameters get not resolved

Votes:

0

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

batch-file notification parameter

Created on Nov 1, 2019 12:08:34 PM



2 Replies

Votes:

1

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

Created on Nov 1, 2019 12:31:46 PM by  Erhard Mikulik [Paessler Support]

Last change on Nov 1, 2019 12:32:42 PM by  Erhard Mikulik [Paessler Support]



Votes:

1

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

Created on Nov 1, 2019 12:50:39 PM




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.