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

EXE Powershell script XML

Votes:

0

Hi,

I create new EXE/Script advanced sensor

PS script (ok):

# XML Output for PRTG
Write-Host "<prtg>"
Write-Host "<result>"
                "<channel>Sessions</channel>"
                "<float>0</float>"
                "<value>10</value>"
           "</result>"
Write-Host "</prtg>"

PS script edited (fail)

%i = 10

# XML Output for PRTG
Write-Host "<prtg>"
Write-Host "<result>"
                "<channel>Sessions</channel>"
                "<float>0</float>"
                "<value>%i</value>"
           "</result>"
Write-Host "</prtg>"

Output: This sensor has not received data for x minutes x seconds.

No output to PRTG Network Monitor\Logs (Sensors)

I tried to restart server, services. Error still persist.

Thank You

powershell prtg script

Created on Nov 16, 2016 10:49:57 AM

Last change on Nov 16, 2016 1:33:39 PM by  Stephan Linke [Paessler Support]



1 Reply

Votes:

0

What output do you get when you execute the script manually? Do other powershell based EXE/Script sensors work, if existing?

Created on Nov 16, 2016 1:34:14 PM 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.