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

Can I retrieve a list of devices with no sensors configured?

Votes:

0

Is it possible to retrieve a list of devices that have no sensors configured yet?

device script sensors

Created on Oct 19, 2016 6:32:18 AM by  Stephan Linke [Paessler Support]

Last change on Oct 19, 2016 6:34:30 AM by  Stephan Linke [Paessler Support]



1 Reply

Votes:

0

The following script will allow you to do that. Simply save it as Get-EmptyDevices.ps1 and run it on the PRTG server within a PowerShell window:

[string] $ConfigurationFilePath = ((Get-ItemProperty -Path "hklm:SOFTWARE\Wow6432Node\Paessler\PRTG Network Monitor\Server\Core" -Name "Datapath").DataPath) + "PRTG Configuration.dat"
   [xml] $configuration = New-Object -TypeName XML;
         $configuration.Load($ConfigurationFilePath)

$Devices = ($configuration.SelectNodes("//device"))

$DeviceList = foreach ($Device in $Devices) 
{   

    $Sensors = ($configuration.SelectNodes("//device[@id='$($device.id)']/nodes/sensor").Count); 
 
    [pscustomobject]@{
        ObjectID = $Device.id
        Name     = $Device.data.name.Trim();
        Sensors  = $Sensors
        }

}

$DeviceList | Out-GridView

It will output a list similar to that: List of devices with no sensors

Created on Oct 19, 2016 6:33:48 AM 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.