| {%- if plugin.get('url', {})|length > 0 %} |
| Import "collectd_http_check" |
| |
| <Module "collectd_http_check"> |
| MaxRetries "3" |
| Timeout "1" |
| PollingInterval "{{ plugin.polling_interval|default("10") }}" |
| {%- for name, params in plugin.url.iteritems() %} |
| ExpectedCode "{{ name }}" "{{ params.expected_code }}" |
| Url "{{ name }}" "{{ params.url }}" |
| {%- if params.get('expected_content') %} |
| ExpectedContent "{{ name }}" "{{ params.expected_content|replace('"','\\"') }}" |
| {%- endif %} |
| {%- if params.verify is defined %} |
| Verify "{{ name }}" "{{ params.verify }}" |
| {%- endif %} |
| {%- if params.get('client_cert') %} |
| ClientCert "{{ name }}" "{{ params.client_cert }}" |
| {%- endif %} |
| {%- if params.get('client_key') %} |
| ClientKey "{{ name }}" "{{ params.client_key }}" |
| {%- endif %} |
| {%- endfor %} |
| </Module> |
| {%- endif %} |