github.com/recobe182/terraform@v0.8.5-0.20170117231232-49ab22a935b7/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 arguments = { 27 "-H" = "$apache_status_address$" 28 "-c" = "$apache_status_critical$" 29 "-p" = "$apache_status_port$" 30 } 31 } 32 ``` 33 34 ## Argument Reference 35 36 The following arguments are supported: 37 38 * `arguments` - (Optional) A mapping of arguments to include with the command. 39 * `command` - (Required) Path to the command te be executed. 40 * `name` - (Required) Name by which to reference the checkcommand 41 * `templates` - (Optional) A list of Icinga2 templates to assign to the host.