diff options
author | Erik Froese <erik.froese@gmail.com> | 2012-04-25 09:57:39 -0400 |
---|---|---|
committer | Erik Froese <erik.froese@gmail.com> | 2012-05-01 11:11:56 -0400 |
commit | b0a5c09d81d0eb5151c32c6d8d14753c8529ede5 (patch) | |
tree | eaea54ebb3e256abdfe90750a44386037ac17f74 | |
parent | 9d1e4d707694489b91a4c5b5be7af44cf9b9493d (diff) |
Add the port arg to check_http_url_regex. Default 80.
-rw-r--r-- | manifests/defaults/commands.pp | 2 | ||||
-rw-r--r-- | manifests/service/http.pp | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/manifests/defaults/commands.pp b/manifests/defaults/commands.pp index 3b0da37..195c8e3 100644 --- a/manifests/defaults/commands.pp +++ b/manifests/defaults/commands.pp @@ -64,7 +64,7 @@ class nagios::defaults::commands { check_http_url: command_line => '$USER1$/check_http -H $ARG1$ -u $ARG2$'; check_http_url_regex: - command_line => '$USER1$/check_http -H $ARG1$ -u $ARG2$ -e $ARG3$'; + command_line => '$USER1$/check_http -H $ARG1$ -p $ARG2$ -u $ARG3$ -e $ARG4$'; check_https_url: command_line => '$USER1$/check_http --ssl -H $ARG1$ -u $ARG2$'; check_https_url_regex: diff --git a/manifests/service/http.pp b/manifests/service/http.pp index 8fd5059..ef63abb 100644 --- a/manifests/service/http.pp +++ b/manifests/service/http.pp @@ -6,6 +6,7 @@ define nagios::service::http( $ensure = present, $check_domain = 'absent', + $port = '80', $check_url = '/', $check_code = 'OK', $use = 'generic-service', @@ -27,7 +28,7 @@ define nagios::service::http( nagios::service{"httprd_${name}": ensure => $ensure, use => $use, - check_command => "check_http_url_regex!${real_check_domain}!${check_url}!'301'", + check_command => "check_http_url_regex!${real_check_domain}!${port}!${check_url}!'301'", } } } @@ -38,7 +39,7 @@ define nagios::service::http( nagios::service{"http_${name}_${check_code}": ensure => $ensure, use => $use, - check_command => "check_http_url_regex!${real_check_domain}!${check_url}!'${check_code}'", + check_command => "check_http_url_regex!${real_check_domain}!${port}!${check_url}!'${check_code}'", } } } |