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

Custom MapObject to fetch more than one channel from a sensor



I would like to create a MapObject, where I could display the data of all channels from a sensor and not just the primary. Just like the gauge object but without the gauges or the graph object but of cause without the graph.

For Example I have a custom Powershell Sensor which lists all VMs with snapshots on it with the help of PowerCLI. On my map/dashboard I have an area for vm related monitoring where I want to display a list of vm-Names with VMs which have a current snapshot. Here my Custom PS Sensor:

Connect-VIServer -Server *** -User ***

$VMList = Get-VM | Get-Snapshot | Select-Object VM, Name, Created
$CurrentDate = Get-Date
$SnapshotCount = $VMList.COUNT

$output = @"
<?xml version=`"1.0`" encoding=`"UTF-8`" ?>
    <channel>Snapshot Count</channel>

foreach ($VM in $VMList) {
    $VMName = $VM.VM
    $SnapshotDate = [datetime]$VM.Created
    $timebetween = New-TimeSpan -Start $SnapshotDate -End $CurrentDate
    $daysbetween = $timebetween.Days
    $tobeappended = @"

$output = $output + $tobeappended

$endofoutput = @"

$output = $output + $endofoutput

Don't judge the naming of my variables^^

This script will create for all of the VMs with an active snapshot a separate channel with the value of "days since last snapshot".

Thanks for your help :)

channel custom custom-sensor map-objects powercli powershell snapshot vmware

Created on Jan 6, 2020 2:48:49 PM

Last change on Jan 7, 2020 5:10:53 AM by  Sven Roggenhofer [Paessler Technical Support]


Nobody has replied yet

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.