nagios: Added $expect option support for HTTPs service target.
This commit is contained in:
parent
6ccc9005b3
commit
050475667a
1 changed files with 13 additions and 2 deletions
|
@ -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",
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue