Is there a way to generate a report on devices that don't have any sensors associated with them?
Generate report for devices without any sensors
Votes:
0
6 Replies
Votes:
0
Why would you want to do that? There's nothing to report on ... ;)
Votes:
0
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).
Votes:
0
Ah, so you literally need a list of devices that have no sensors configured?
Created on Oct 18, 2016 6:51:53 PM by
Stephan Linke [Paessler Support]
Last change on Oct 18, 2016 6:53:01 PM by
Stephan Linke [Paessler Support]
Votes:
0
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:
Votes:
0
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 :(
Votes:
0
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).
Add comment