From b0a5c09d81d0eb5151c32c6d8d14753c8529ede5 Mon Sep 17 00:00:00 2001 From: Erik Froese Date: Wed, 25 Apr 2012 09:57:39 -0400 Subject: Add the port arg to check_http_url_regex. Default 80. --- manifests/defaults/commands.pp | 2 +- manifests/service/http.pp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'manifests') 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}'", } } } -- cgit v1.2.3