Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_ldap_request

Rating
0 votes
Favoured:
0
Hits
151229
Files:
FileDescription
check_ldap_request.tgzcheck_ldap_request.tgz
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Check if an LDAP attribute exist
#===============================================================================
#
# FILE: check_ldap_request.pl
#
# USAGE: ./check_ldap_request.pl -H hostname -b base -f filer [-s scope] [-h]
#
# DESCRIPTION: Nagios Plugin - Check if LDAP attribute exist
#
# OPTIONS: ---
# REQUIREMENTS: Net::LDAP Perl library
# BUGS: ---
# NOTES: ---
# LICENSE: This Nagios module is under GPLv2 License
# AUTHOR: Pierre Mavro
# COMPANY:
# VERSION: 1.0
# CREATED: 09/12/2009 15:38:41
# REVISION: ---
#===============================================================================
#
# Installation :
# - Simply put the nagios plugin check_ldap_request.pl in your nagios-plugins directory
# - Install the perl module using cpan (install Net::LDAP)
#
#===============================================================================
#
# Nagios configuration :
#
# define command{
# command_name check_ldap_request
# command_line $USER2$/check_ldap_request.pl -H $HOSTADDRESS$ -b "dc=ldap,dc=company,dc=lan" -f "uid=pmavro"
#}
#
#define service{
# use generic-services
# hostgroup_name ldapsrv
# service_description LDAP request check
# check_command check_ldap_request
#}
#
#===============================================================================
#
# Usage : ./check_ldap -H hostname -b base -f filer [-s scope] [-h]
# -H : LDAP server hostname or IP
# -b : Base of LDAP server (ex: "dc=ldap,dc=company,dc=lan")
# -f : Specify a filter (ex: "uid=pmavro")
# -s : LDAP Scope (ex: sub)
# -h : Print this help message
#
# Examples :
# $ ./check_ldap_request.pl -H prd-ldap-srv -b "dc=openldap,dc=mycompany,dc=com" -f "uid=pmavro"
# LDAP request OK - 'uid=pmavro' exists
#
# $ ./check_ldap_request.pl -H prd-ldap-srv -b "dc=openldap,dc=mycompany,dc=com" -f "cn=foo"
# LDAP request CRITICAL - unable to find 'cn=foo'
#