diff --git a/doc/9-appendix.md b/doc/9-appendix.md index aa6e13feb..b2e2389be 100644 --- a/doc/9-appendix.md +++ b/doc/9-appendix.md @@ -304,6 +304,21 @@ snmp_address | **Optional.** The host's address. Defaults to "$address$". snmp_oid | **Optional.** The SNMP OID. Defaults to "1.3.6.1.2.1.1.3.0". snmp_community | **Optional.** The SNMP community. Defaults to "public". +#### dhcp + +Check command object for the `check_dhcp` plugin. + +Custom Attributes: + +Name | Description +----------------|-------------- +dhcp_serverip | **Optional.** The IP address of the DHCP server which we should get a response from. +dhcp_requestedip| **Optional.** The IP address which we should be offered by a DHCP server. +dhcp_timeout | **Optional.** The timeout in seconds. +dhcp_interface | **Optional.** The interface to use. +dhcp_mac | **Optional.** The MAC address to use in the DHCP request. +dhcp_unicast | **Optional.** Whether to use unicast requests. Defaults to false. + #### nscp Check command object for the `check_nt` plugin. diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index b0c5b7559..f127e96c6 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -287,6 +287,25 @@ object CheckCommand "apt" { ] } +object CheckCommand "dhcp" { + import "plugin-check-command" + + command = PluginDir + "/check_dhcp" + + arguments = { + "-s" = "$dhcp_serverip$" + "-r" = "$dhcp_requestedip$" + "-t" = "$dhcp_timeout$" + "-i" = "$dhcp_interface$" + "-m" = "$dhcp_mac$" + "-u" = { + set_if = "$dhcp_unicast$" + } + } + + vars.dhcp_unicast = false +} + object CheckCommand "nscp" { import "plugin-check-command"