From ce958b5e3ea480a934bfe7912e90b65703a2adf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Fri, 10 May 2013 23:55:22 +0300 Subject: [PATCH] nagios: Added LDAP and LDAPs service targets. --- nagios/files/commands.cfg | 7 +++++++ nagios/manifests/target.pp | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/nagios/files/commands.cfg b/nagios/files/commands.cfg index 4e42c13..b6cdcc6 100644 --- a/nagios/files/commands.cfg +++ b/nagios/files/commands.cfg @@ -148,6 +148,13 @@ define command{ } +# 'check_ldap' command definition +define command{ + command_name check_ldap + command_line $USER1$/check_ldap -H $HOSTADDRESS$ -b $ARG1$ + } + + # 'check_ssh' command definition define command{ command_name check_ssh diff --git a/nagios/manifests/target.pp b/nagios/manifests/target.pp index 2da8861..c2b6ad9 100644 --- a/nagios/manifests/target.pp +++ b/nagios/manifests/target.pp @@ -105,6 +105,30 @@ class nagios::target::imaps inherits nagios::target { } +# Configure ldap service target. +# +class nagios::target::ldap inherits nagios::target { + + @@nagios::service { "${::homename}_ldap": + command => "check_ldap!${ldap_basedn}", + description => "LDAP", + } + +} + + +# Configure ldaps service target. +# +class nagios::target::ldaps inherits nagios::target { + + @@nagios::service { "${::homename}_ldaps": + command => "check_ldap!${ldap_basedn} -p 636", + description => "LDAPs", + } + +} + + # Configure smtp service target. # class nagios::target::smtp inherits nagios::target {