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

Why does my advanced script on the prtg keep returning output: missing prtg?

Votes:

0

I've put a powershell Advanced script in prtg but keep getting the output: missing prtg. The script works fine in powershell. The script contains a string to run C# code to make a Http request and should return a xml string with channel values. (see example output)

example output:

<prtg><result><channel>Loading time</channel><Value>20</Value></result></prtg>

After a run on prtg , the log outputs are empty. I also tried setting the unrestricted and remotesigned settings. What else can I do?

advanced-script-sensor powershell prtg

Created on Jul 6, 2012 9:49:34 AM

Last change on Jul 6, 2012 1:18:32 PM by  Konstantin Wolff [Paessler Support]



3 Replies

Votes:

0

Hi,
I just tried to recreat the issue, but it seems not related to the output itself as this works fine when just delivering back the same to PRTG.
The error message could indicate that the .NET Framework is missing on the machine where you want to run the script.
Best regards

Created on Jul 6, 2012 1:18:09 PM by  Konstantin Wolff [Paessler Support]



Votes:

0

I get the same 'Last message': Error reading response: missing /prtg. I am using the DFSR Backlog script from the Google code repository for custom sensors. I enabled the write results to file and get a message concerning the Powershell execution policy. I have this set to Unrestricted on the remote probe and both server I'm trying to get results from. The results file is blank if I set the sensor to use the parent device's Windows credentials (which is a domain administrator account). I tried disabling UAC and have .Net Framework 4 installed on the remote probe. I get valid results with all PRTG XML tags when I run in from the remote probe.

Created on Aug 22, 2012 6:38:01 PM



Votes:

0

Hi,
depending on the system architecture (32/64 bit) you will have to set the execution policy in different powershells. As PRTG is a 32 bit application it uses the 32 bit powershell (\Windows\SysWOW64) and therefore the execution policy has to be set there.
Then the script should be executed properly.
Best regards

Created on Aug 23, 2012 6:58:28 AM by  Konstantin Wolff [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.