Is there a way to generate a report on devices that don't have any sensors associated with them?
Article Comments
Exactly! We have some people that are adding devices into PRTG that aren't on the network yet, and then they neglect to go back and rediscover them after they deploy them. I need a way to see how many we have that are out there in this state (I've found a few so far by accident).
Oct, 2016 - Permalink
Here you go, 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
Will look something like this:
Oct, 2016 - Permalink
Khansen - Great question.
Stephan - Great answer. KB it.
I recently just setup PRTG for a company (number 4 and counting), and added many blank devices to get a better feel of the best structure.
It was only yesterday I manually went through every group looking for blank devices (luck I only have 200 devices so far)
You could adapt this to check all devices of a certain type have certain sensors (eg, all windows servers have CPU and disk sensors). Its not a good feeling to have a monitored server run out of disk space, only to find PRTG was only PINGing it :(
Oct, 2016 - Permalink
Hi Andrew,
Thanks for the praise, kb'd it ;) You can sure turn this into a compliance checking tool, but that depends on the individual needs - I'd love to do it, but due to us being shortstaffed currently, that's not an option. I might look into it later (and by later I mean next month :D).
Oct, 2016 - Permalink
Why would you want to do that? There's nothing to report on ... ;)
Oct, 2016 - Permalink