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

Using PRTG to monitor Delivery Optimization

Votes:

0

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



1 Reply

Votes:

0

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] (1,441) 2 1




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.