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(-) 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 From cd05fee87d406a77eaf0f4441062e3478c27601d Mon Sep 17 00:00:00 2001 From: Erik Froese Date: Tue, 24 Apr 2012 11:52:22 -0400 Subject: Remove unnecessary jabber dependency. --- manifests/defaults/plugins.pp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/manifests/defaults/plugins.pp b/manifests/defaults/plugins.pp index b713354..abd8b52 100644 --- a/manifests/defaults/plugins.pp +++ b/manifests/defaults/plugins.pp @@ -6,9 +6,5 @@ class nagios::defaults::plugins { source => 'nagios/plugins/check_dns2'; 'check_dnsbl': source => 'nagios/plugins/check_dnsbl'; - 'check_jabber_login': - source => 'nagios/plugins/check_jabber_login'; } - # for check_jabber_login - require rubygems::xmpp4r } -- cgit v1.2.3 From 057af9e85d958b1f75a4999570693f1fd428993a Mon Sep 17 00:00:00 2001 From: Erik Froese Date: Tue, 1 May 2012 11:15:07 -0400 Subject: Move the jabber plugin to its own class. --- manifests/plugin/jabber.pp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 manifests/plugin/jabber.pp diff --git a/manifests/plugin/jabber.pp b/manifests/plugin/jabber.pp new file mode 100644 index 0000000..380a5c0 --- /dev/null +++ b/manifests/plugin/jabber.pp @@ -0,0 +1,10 @@ +class nagios::plugins::jabber { + + # for check_jabber_login + require rubygems::xmpp4r + + nagios::plugin { 'check_jabber_login': + source => 'nagios/plugins/check_jabber_login' + } +} + -- cgit v1.2.3