github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/icinga2/r/checkcommands.html.markdown (about) 1 --- 2 layout: "icinga2" 3 page_title: "Icinga2: host" 4 sidebar_current: "docs-icinga2-resource-checkcommand" 5 description: |- 6 Configures a checkcommand resource. This allows checkcommands to be configured, updated and deleted. 7 --- 8 9 # icinga2\_checkcommand 10 11 Configures an Icinga2 checkcommand resource. This allows checkcommands to be configured, updated, 12 and deleted. 13 14 ## Example Usage 15 16 ``` 17 # Configure a new checkcommand on an Icinga2 Server, that can be used to monitor hosts and/or services 18 provider "icinga2" { 19 api_url = "https://192.168.33.5:5665/v1" 20 } 21 22 resource "icinga2_checkcommand" "apache_status" { 23 name = "apache_status" 24 templates = ["apache-status", "plugin-check-command", "plugin-check-command", "ipv4-or-ipv6"] 25 command = "/usr/lib64/nagios/plugins/check_apache_status.pl" 26 27 arguments = { 28 "-H" = "$apache_status_address$" 29 "-c" = "$apache_status_critical$" 30 "-p" = "$apache_status_port$" 31 } 32 } 33 ``` 34 35 ## Argument Reference 36 37 The following arguments are supported: 38 39 * `arguments` - (Optional) A mapping of arguments to include with the command. 40 * `command` - (Required) Path to the command te be executed. 41 * `name` - (Required) Name by which to reference the checkcommand 42 * `templates` - (Optional) A list of Icinga2 templates to assign to the host.