icinga-powershell-plugins
icinga-powershell-plugins copied to clipboard
New Dhcp Scopes check.
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.
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