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


Using PRTG to monitor Delivery Optimization

Votes:

0

Your Vote:

Up

Down

I am trying to use PRTG to monitor Delivery Optimization performance across the Windows 10 PCs on my LAN utlising the powershell cmdlets -

Get-DeliveryOptimizationPerfSnap & Get-DeliveryOptimizationStatus

Using a custom sensor (advanced) I know that I need to generate XML formatted output but this is where I am stuggling.

I have a PS1 script called by the custom sensor as follows that just doesn't seem to be doing it.

$x = Get-DeliveryOptimizationPerfSnap -verbose | ConvertTo-Xml $x.objects.Object

I get the error "XML: The returned XML does not match the expected schema. (code: PE233) -- JSON: The returned JSON does not match the expected structure (Invalid JSON.). (code: PE231)"

Can anyone point me in the right direction as I don't have much experience with PowerShell.

custom-sensor powershell-module xml

Created on Feb 9, 2018 2:39:20 PM by  steveatvarlink (0) 1



1 Reply

Votes:

0

Your Vote:

Up

Down

Sure, most users leverage the Write-Host command to control the output from the ps1 file.

Here is an example from another PowerShell sensor.

Write-Host "<prtg>" Write-Host "<result>" Write-Host "<channel>Locked Out Users</channel>" Write-Host "<value>"+ $a +"</value>" Write-Host "</result>" Write-Host "</prtg>"

Created on Feb 10, 2018 2:28:39 AM by  Benjamin Day [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.