Hello,
first of all, thanks for the great PRTG Script. We use the newest Version of your script.
We use AddressesInUse to check if a DHCP Scope is empty. If one IP Adress is showing up in the Scope the Sensors goes to warning.
The script was running for a long time but now i have a strange problem.
PRTG shows that in that scope a ip is used . But thats not true. I checked the DHCP Server Log, the DHCP Console and run the Powershell command Get-DhcpServerv4Lease.
There is no lease in the DHCP Scope
But if i run your script i get this result
`Scope: 172.28.202.0 -PercentageInUse
10
<unit>Percent</unit>
<limitmode>1</limitmode>
<LimitMaxError>95</LimitMaxError>
<LimitMaxWarning>90</LimitMaxWarning>
<LimitErrorMsg>DHCP Scope is over 95%</LimitErrorMsg>
<LimitWarningMsg>DHCP Scope is over 90%</LimitWarningMsg>
</result><result>
<channel>Scope: 172.28.202.0 -AddressesInUse</channel>
<unit>Custom</unit>
<customUnit>IP</customUnit>
<mode>Absolute</mode>
<showChart>1</showChart>
<showTable>1</showTable>
<float>0</float>
**<value> 1 </value>**
</result><result>`
I rebooted the DHCP Server and the PRTG Server but the Script always giving me back the wrong value. i created a new sensor but the error still appears.
Do you have any idea whats going wrong? Is there any cache that can generate this wrong value?
Problem is on our DHCP Server.
With Get-DhcpServerv4ScopeStatistics i can see that there is a Lease inUse but i can not see this lease in the console or everywhere.
Hello, first of all, thanks for the great PRTG Script. We use the newest Version of your script.
We use AddressesInUse to check if a DHCP Scope is empty. If one IP Adress is showing up in the Scope the Sensors goes to warning. The script was running for a long time but now i have a strange problem. PRTG shows that in that scope a ip is used . But thats not true. I checked the DHCP Server Log, the DHCP Console and run the Powershell command Get-DhcpServerv4Lease. There is no lease in the DHCP Scope
But if i run your script i get this result `Scope: 172.28.202.0 -PercentageInUse
I rebooted the DHCP Server and the PRTG Server but the Script always giving me back the wrong value. i created a new sensor but the error still appears. Do you have any idea whats going wrong? Is there any cache that can generate this wrong value?