summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2015-10-12 23:26:10 +0200
committermh <mh@immerda.ch>2015-10-12 23:26:10 +0200
commitbbda7cef0b0d6d68c9d2c393592cbfbef9f3534e (patch)
treed6e9b8d10602ca97af5964c9f9ecae3607291307 /manifests
parent5e92209e5b284e0f0d99c30e555cc498a39c396e (diff)
introduce horde_login checks
Diffstat (limited to 'manifests')
-rw-r--r--manifests/plugins/horde_login.pp9
-rw-r--r--manifests/service/horde_login.pp18
2 files changed, 27 insertions, 0 deletions
diff --git a/manifests/plugins/horde_login.pp b/manifests/plugins/horde_login.pp
new file mode 100644
index 0000000..908b57b
--- /dev/null
+++ b/manifests/plugins/horde_login.pp
@@ -0,0 +1,9 @@
+# check_horde_login
+class nagios::plugins::horde_login {
+ nagios::plugin { 'check_horde_login':
+ source => 'nagios/plugins/check_horde_login',
+ } -> nagios_command {
+ 'check_horde_login':
+ command_line => "\$USER1\$/check_horde_login -s \$ARG1\$ -u \$ARG2\$ -p \$ARG3\$",
+ }
+}
diff --git a/manifests/service/horde_login.pp b/manifests/service/horde_login.pp
new file mode 100644
index 0000000..876ce2b
--- /dev/null
+++ b/manifests/service/horde_login.pp
@@ -0,0 +1,18 @@
+# a horde login check
+define nagios::service::horde_login(
+ $username,
+ $password,
+ $url,
+ $ensure = 'present',
+){
+ nagios::service{
+ "horde_${name}":
+ ensure => $ensure;
+ }
+
+ if $ensure != 'absent' {
+ Nagios::Service["horde_${name}"]{
+ check_command => "check_horde_login!${url}!${username}!${password}",
+ }
+ }
+}