New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Log file with all notifications' "execute program" calls

Votes:

0

Your Vote:

Up

Down

Hello,

is there a way to make PRTG create a logfile and record there all the "execute program" calls so that it would show the commands as they were used in the notifications? Sometimes the notification fails but when I run the notification script with exactly the same command line including all the populated variables, it doesn't fail.

logfile notifications troubleshooting

Created on Apr 18, 2017 1:48:36 PM by  R (1) 1



5 Replies

Votes:

0

Your Vote:

Up

Down

Hi there,

What error messages or log infos do you get under "Logs > System Events > Notifications"? There you should see the error message that is thrown by the EXE file.

Created on Apr 19, 2017 7:06:48 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

I was not asking for error messages returned by the application started by PRTG. I was asking for the whole call, i.e. full command that was executed by PRTG.

The thing is that PRTG's variables may contain some special characters that may have a special meaning for particular applications that are started by PRTG. And once the command is issued, the parameters containing these special characters may be parsed differently. Imagine e.g. how unexpected quotation marks may change the meaning of issued command. Such command won't necessarily fail, it will just be a different command than the one which was meant to be issued.

This brings me to escaping special characters. Can you provide some way how to make sure that some special characters contained in your variables will be escaped as needed by the application that is triggered by notifications?

Created on Apr 19, 2017 11:38:15 AM by  R (1) 1



Votes:

0

Your Vote:

Up

Down

Hi there,

The PRTG Server executes the executable as in the following example:

'Notification.ps1 -parameter1="1234" -parameter2="5678"'

So it is better to put the values of a parameter into double-quotes as the whole call be escaped with single quotes.

Additionally, please have a look at the following sites to debug this kind of notification:
https://kb.paessler.com/en/topic/11283
https://kb.paessler.com/en/topic/2543

Best regards.

Created on Apr 19, 2017 12:04:50 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Well, this doesn't handle the situation in which some of the PRTG variables contain characters like quotation marks. In such case, only part of the parameter would be received by the script.

Created on Apr 20, 2017 3:48:02 PM by  R (1) 1



Votes:

0

Your Vote:

Up

Down

Hi there,

If a parameter has double quotes, then use single quotes to escape the double quotes. Maybe you can give me an example of your parameters with special characters so I can test this in our test-environment to give you a more precise answer how you can escape them. :)

Best regards.

Created on Apr 21, 2017 7:20:20 AM by  Dariusz Gorka [Paessler Support]



Please log in or register to enter your reply.


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.