icinga-powershell-plugins icon indicating copy to clipboard operation
icinga-powershell-plugins copied to clipboard

New Dhcp Scopes check.

Open drapiti opened this issue 3 years ago • 1 comments
trafficstars

Would it be possible to add an official dhcp check to verify the occupation of dhcp leases on specific windows dhcp servers. It would be great if we could have something simple like this:

$scope = Get-DhcpServerV4Scope $statistics = $scope | % {Get-DhcpServerv4ScopeStatistics -ScopeId $.ScopeID} [Array]$allert = @() $allert = $statistics |? {$.PercentageInUse -ge 98}

if ($allert.count -ge 1) { $message = $allert | out-String Write-EventLog -LogName Application -EntryType Error -EventId 4444 -Source monitoringDhcp -Message $message } else { Write-EventLog -LogName Application -EventId 5555 -Source monitoringDhcp -Message "No scopes are full..." }

An event log is not necessary obviously but something that simply checks each scope is required.

Thanks.

drapiti avatar Dec 06 '21 15:12 drapiti

Yeah this is something we can definitely provide. I will have a look on this and put it in the roadmap for v1.9.0

LordHepipud avatar Jan 22 '22 20:01 LordHepipud