nagios: Added $expect option support for HTTPs service target.

This commit is contained in:
Timo Makinen 2014-10-10 09:22:21 +03:00
parent 6ccc9005b3
commit 050475667a

View file

@ -101,10 +101,21 @@ class nagios::target::http inherits nagios::target {
# Configure https service target.
#
class nagios::target::https inherits nagios::target {
# === Parameters
#
# $expect:
# Comma-delimited list of strings, at least one of them is
# expected in the first (status) line of the server response
# (default: HTTP/1.) If specified skips all other status line
# logic (ex: 3xx, 4xx, 5xx processing)
#
class nagios::target::https($expect=undef) inherits nagios::target {
@@nagios::service { "${::homename}_https":
command => "check_http!--ssl",
command => $expect ? {
undef => "check_http!--ssl",
default => "check_http!--ssl --expect='${expect}'",
},
description => "HTTPS",
}