github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/ns1/r/monitoringjob.html.markdown (about) 1 --- 2 layout: "ns1" 3 page_title: "NS1: ns1_monitoringjob" 4 sidebar_current: "docs-ns1-resource-monitoringjob" 5 description: |- 6 Provides a NS1 Monitoring Job resource. 7 --- 8 9 # ns1\_monitoringjob 10 11 Provides a NS1 Monitoring Job resource. This can be used to create, modify, and delete monitoring jobs. 12 13 ## Example Usage 14 15 ``` 16 resource "ns1_monitoringjob" "uswest_monitor" { 17 name = "uswest" 18 active = true 19 regions = ["sjc", "sin", "lga"] 20 job_type = "tcp" 21 frequency = 60 22 rapid_recheck = true 23 policy = "quorum" 24 25 config = { 26 send = "HEAD / HTTP/1.0\r\n\r\n" 27 port = 80 28 host = "example-elb-uswest.aws.amazon.com" 29 } 30 31 rules = { 32 value = "200 OK" 33 comparison = "contains" 34 key = "output" 35 } 36 } 37 ``` 38 39 ## Argument Reference 40 41 The following arguments are supported: 42 43 * `name` - (Required) The free-form display name for the monitoring job. 44 * `job_type` - (Required) The type of monitoring job to be run. 45 * `active` - (Required) Indicates if the job is active or temporaril.y disabled. 46 * `regions` - (Required) The list of region codes in which to run the monitoring job. 47 * `frequency` - (Required) The frequency, in seconds, at which to run the monitoring job in each region. 48 * `rapid_recheck` - (Required) If true, on any apparent state change, the job is quickly re-run after one second to confirm the state change before notification. 49 * `policy` - (Required) The policy for determining the monitor's global status based on the status of the job in all regions. 50 * `config` - (Required) A configuration dictionary with keys and values depending on the jobs' type. 51 * `notify_delay` - (Optional) The time in seconds after a failure to wait before sending a notification. 52 * `notify_repeat` - (Optional) The time in seconds between repeat notifications of a failed job. 53 * `notify_failback` - (Optional) If true, a notification is sent when a job returns to an "up" state. 54 * `notify_regional` - (Optional) If true, notifications are sent for any regional failure (and failback if desired), in addition to global state notifications. 55 * `notify_list` - (Optional) The id of the notification list to send notifications to. 56 * `notes` - (Optional) Freeform notes to be included in any notifications about this job. 57 * `rules` - (Optional) A list of rules for determining failure conditions. Job Rules are documented below. 58 59 Monitoring Job Rules (`rules`) support the following: 60 61 * `key` - (Required) The output key. 62 * `comparison` - (Required) The comparison to perform on the the output. 63 * `value` - (Required) The value to compare to. 64