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

Notofication doesn´t execute the script

Votes:

0

Hello,

i have a problem with the notification. I set it to execute this scriptand set the right parameters.

The scripts works if it is executed in the powershell of de server containing the same parameters as the PRTG server. The Notification protocol shows "sending EXE: OK" after the trigger pulls, but if i put in the subject or in the body variables like %message or %name it always shows up errors like:

Fehler beim Versenden von "EXE": Fehler1. Code: : The term 'Code:' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:161 + ... ierter[...] (Sensor/Source/ID: 5074/5072/1)

in this example the error message has a "Code:" and it doesn't recognize it as a string. What is set wrong?

custom-notification exe-script-sensor notification-email notifications

Created on Feb 4, 2016 1:53:25 PM

Last change on Feb 5, 2016 1:17:22 PM by  Luciano Lingnau [Paessler]



8 Replies

Votes:

0

What do the parameters look like exactly?

Created on Feb 5, 2016 1:23:37 PM by  Stephan Linke [Paessler Support]



Votes:

0

the Notofications functions with this parameters: [email protected] "Device" "Errormessage" sntpserver [email protected]

but it doesn´t work with this one: [email protected] "%device" ""%status" sntpserver [email protected]

the tests show that it doesn´t matter if the variables are positioned in the quotation or not.

Created on Feb 5, 2016 1:31:56 PM



Votes:

0

There's an extra quote there, try this one:
[email protected] "%device" "%status" smtpserver [email protected]

Created on Feb 5, 2016 2:51:38 PM by  Stephan Linke [Paessler Support]



Votes:

0

sorry it was my fault. The extra quote was put in by me when i wrote the example with the variables. This quote wasn´t there on our tests. I just verified the parameters these are: [email protected] "%device" "%status" smtpserver [email protected]

Just like you said.

Created on Feb 5, 2016 3:06:33 PM



Votes:

0

a new update to this post: it works only when the variable contains only one string like "device.domain.local" but it wouldn´t work if it contains any space between the words (ex. device domain local). It seems like the quotes in the parameters are totally ignored.

Created on Feb 8, 2016 2:40:56 PM



Votes:

0

Ah - can you try using single quotes instead of double quotes? And double double quotes, e.g. ""%device""" - does it work then?

Created on Feb 9, 2016 7:23:45 AM by  Stephan Linke [Paessler Support]



Votes:

0

it works only with apostrophes

Created on Sep 7, 2016 8:30:31 AM



Votes:

0

Well, that took quite some time ;) Please open up a support ticket, we can solve it better that way.

Thanks!

Created on Sep 7, 2016 10:49:47 AM by  Stephan Linke [Paessler Support]




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.