diff options
author | duritong <peter.meier+github@immerda.ch> | 2012-05-05 07:59:20 -0700 |
---|---|---|
committer | duritong <peter.meier+github@immerda.ch> | 2012-05-05 07:59:20 -0700 |
commit | acdb652ceb0613bd94a3fa115fea7044b8f87314 (patch) | |
tree | e89a36e9f03e2dedf21360af767120ec281b2e58 | |
parent | 38a066f0ff28816a38f44340095311545b883b80 (diff) | |
parent | b0a5c09d81d0eb5151c32c6d8d14753c8529ede5 (diff) |
Merge pull request #4 from efroese/http-check
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}'", } } } |