DirX Directory Nagios Plugin Configuration File

check_dirx_config.pm

Purpose

The DirX Directory Nagios plugin configuration file, used by all of the plugins *.pl, defines the operating parameters for the DirX Directory Nagios plugins. The settings in the file apply to all plugin instances running on a local host.

Description

The default location and file name for the DirX Directory Nagios plugin file check_dirx_config.pm is:

install_path/monitoring/nagios/check_dirx_config.pm.sample

Copy this file to each machine that hosts the DirX Directory Nagios plugins, rename it to check_dirx_config.pm, and update the variables to the settings on the local machine.

In the configuration file, comment lines begin with the hash tag character (#) in the first column and are ignored. The format of all other lines is:

$variable="value"

The following variables must be specified:

$DIRXINSTPATH
The path to the DirX Directory service installation on the local machine (install_path). See the chapter File Locations in the DirX Directory Administration Reference for details about the default directories, subdirectories and files for a DirX Directory service installation.

$DIRXLIBPATH
The path to the DirX Directory libraries. The default is install_path /lib. See the chapter File Locations in the DirX Directory Administration Reference for details.

$DIRXEXTOP
The path to the dirxextop executable. The default is install_path*/bin*.

$DIRXLDAPHOST
The name of the local DirX Directory LDAP server. The default is localhost.

$DIRXLDAPPORT
The TCP port number on which the local DirX Directory LDAP server listens for incoming requests from LDAP clients. The default LDAP port number is 389.

$DIRXLDAPUSER
The user that performs dirxextop operations or direct LDAP calls on the plugins' behalf. This user must be configured in the attributes ldapExtOpAdmin or ldapExtOpMonitoringUser in the LDAP server configuration subentry, or the LDAP servers will reject the extended operations made by dirxextop or by direct LDAP calls from the plugin. See the subsection Attributes Controlling LDAP Extended Operations of section Attributes for LDAP Server Configuration in DirX Directory Syntaxes and Attributes for details.

If this user is also to be used as the target of check_dirx_heartbeat plugin, it must also be an ordinary LDAP entry, have a description attribute and exist in the replicated part of the DIT; otherwise, the update to this entry made by the plugin won’t be replicated and the plugin will report a problem. Note that specifying –D and –W arguments to the check_dirx_heartbeat plugin override the user and password specified in $DIRXLDAPUSER and $DIRXLDAPUSERPWD. See the check_dirx_heartbeat reference page for details.

Specify $DIRXLDAPUSER in LDAP distinguished name syntax; for example, "cn=admin,o=my-company". For details about LDAP distinguished name syntax, see the section Distinguished Names in the chapter DirX Directory String Representation for LDAP Binds in DirX Directory Syntaxes and Attributes.

To enable anonymous binding, specify "". An empty value directs the plugins to call dirxextop or make direct LDAP calls as an anonymous user. You can use an anonymous bind if there is no limitation concerning access to the LDAP extended operations; that is, the LDAP Extended Operations Admins attribute has the value all and there are no values specified for the other LDAP Extended Operations * Users attributes. See the subsection Attributes Controlling LDAP Extended Operations in the section Attributes for LDAP Server Configuration in DirX Directory Syntaxes and Attributes for details.

$DIRXLDAPUSERPWD
The password associated with the account specified in $DIRXLDAPUSER. This is the password the plugins will use during dirxextop and direct LDAP bind operations. Specify pw in Directory-String syntax; for example, "dirx". See the section Attribute Syntax in the chapter DirX Directory String Representation for DAP Binds in DirX Directory Syntaxes and Attributes for details.

Example

# Configuration setting for the DirX Nagios plugins
#
# Note, the settings below may need to be customized accordingly
#
# Apr 19, 2013:  the ldap functions return two values each
#                anonymous bind triggered by empty (userDN|userPWD)
# #################################################################
#
# if perl scripts use functionality like "use strict"
# they have to reference the variables below in this script
# by e.g. $::DIRXLDAPHOST
#

# path to DirX installation
$DIRXINSTPATH="/data/dirx";
$DIRXLIBPATH="$DIRXINSTPATH/lib";
$DIRXEXTOP="$DIRXINSTPATH/bin/dirxextop";

# DirX LDAP Server address
$DIRXLDAPHOST="localhost";
$DIRXLDAPPORT=389;

# For administrative bind
$DIRXLDAPUSERPWD="dirx";
$DIRXLDAPUSER="cn=admin,o=my-company";

# For anonymous bind
#$DIRXLDAPUSER="";
#$DIRXLDAPUSERPWD="";