Check dhcp-scope-usage


Checks the IPv4 scope usage for a Windows DHCP server service using the PowerShell command Get-DhcpServerv4ScopeStatistics -ComputerName "". Have a look at for details.

If you provide --winrm-hostname, the check plugin will execute all Powershell commands via WinRM, otherwise it will run locally. This allows the plugin to run on Linux servers as well. By using the winrm Python module, this plugin supports various transport methods in order to authenticate with the WinRM server. The options that are supported in the transport parameter are:

  • basic: Basic auth only works for local Windows accounts, not domain accounts. Credentials are base64 encoded when sending to the server.

  • kerberos: Will use Kerberos authentication for domain accounts which only works when the client is in the same domain as the server and the required dependencies are installed. Currently a Kerberos ticket needs to be initialized outside of the plugin using the kinit command.

  • ntlm: Will use NTLM authentication for both domain and local accounts (default).


  • Set the plugin timeout to 30 seconds.

Fact Sheet

Check Plugin Download

Check Interval Recommendation

Every 15 minutes

Can be called without parameters


Compiled for

Linux, Windows



3rd Party Python modules

optionally Python module winrm if you want to execute it via WinRM


usage: dhcp-scope-usage [-h] [-V] [--always-ok] [-c CRIT] [-H HOSTNAME]
                        [--test TEST] [-w WARN] [--winrm-domain WINRM_DOMAIN]
                        [--winrm-hostname WINRM_HOSTNAME]
                        [--winrm-password WINRM_PASSWORD]
                        [--winrm-transport {basic,ntlm,kerberos}]
                        [--winrm-username WINRM_USERNAME]

Checks the IPv4 scope usage for a Windows DHCP server service.

  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  --always-ok           Always returns OK.
  -c CRIT, --critical CRIT
                        Set the CRIT threshold as a percentage. Default: >= 90
  -H HOSTNAME, --hostname HOSTNAME
                        Specifies the DNS name, or IPv4 or IPv6 address, of
                        the target computer that runs the DHCP server service.
                        Default: localhost
  --test TEST           For unit tests. Needs "path-to-stdout-file,path-to-
  -w WARN, --warning WARN
                        Set the WARN threshold as a percentage. Default: >= 80
  --winrm-domain WINRM_DOMAIN
                        WinRM Domain Name. Default: None
  --winrm-hostname WINRM_HOSTNAME
                        Target Windows computer on which the Windows commands
                        are to be executed. Default: None
  --winrm-password WINRM_PASSWORD
                        WinRM Account Password. Default: None
  --winrm-transport {basic,ntlm,kerberos}
                        WinRM transport type. Default: ntlm
  --winrm-username WINRM_USERNAME
                        WinRM Account Name. Default: None

Usage Examples

Local usage:


Remote usage, for example on a Linux server:

./dhcp-scope-usage3 --winrm-hostname= --winrm-username=Administrator --winrm-password=password --winrm-domain=EXAMPLE.COM --winrm-transport=ntlm


There are one or more criticals.

* 0% used
* 83% used [WARNING]
* 91% used [CRITICAL]


  • WARN if PowerShell cmdlet’s return code is not equal to 0.

  • WARN or CRIT if any DHCP scopy usage in percent is above a given threshold.

Perfdata / Metrics






The IP address range usage for the DHCP scope.

Credits, License