Not a setting, but you can monitor the config file for devices / groups with an enabled auto discovery:
[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)
[System.Collections.ArrayList]$ADEnabledGroups = @();
[System.Collections.ArrayList]$ADEnabledDevices = @();
$Groups = ($configuration.SelectNodes("//group"))
$Devices = ($configuration.SelectNodes("//device"))
foreach($Device in $Devices){
if($device.data.discoverytype.trim() -ne 0)
{ $ADEnabledDevices.Add($device.id); }
}
foreach($Group in $Groups){
if($group.data.discoverytype.trim() -ne 0)
{ $ADEnabledGroups.Add($group.id); }
}
if($ADEnabledDevices.Count -eq 0)
{ $DeviceMsg = "No devices with AutoDiscovery found." }
else
{ $DeviceMsg = [string]::Format("Devices with AutoDiscovery found: {0} ({1})",$ADEnabledDevices.Count,$ADEnabledDevices -join ", ") }
if($ADEnabledGroups.Count -eq 0)
{ $GroupMsg = "No groups with AutoDiscovery found." }
else
{ $GroupMsg = [string]::Format("Groups with AutoDiscovery found: {0} ({1})",$ADEnabledGroups.Count,$ADEnabledGroups -join ", ") }
$Msg = [string]::Format("{0} | {1}",$GroupMsg,$DeviceMsg);
$Count = $ADEnabledGroups.Count + $ADEnabledDevices.Count;
Write-Host ([string]::Format("{0}:{1}",$Count,$Msg))
Note
Since the script checks the configuration, it will take 10 minutes until a configuration change (i.e. an activated auto discovery) will be noticed.
Note that you need to set a limit, preferrably to an upper error limit of 0. Save it to <PRTG>/Custom Sensors/EXE/find-autodiscoveries.ps1 and create a new EXE/Script sensor. Select the script and it should run. Will look somewhat like this:
Add comment