L'actu sur le net

- Contributions de l’équipe OSSA
- Toolinux
- Da Linux French Page
- Daily Daemon News
- Libroscope
- Linagora.com
- LinuxFrench.Net
- LogicielLibre.Net
- PHP

Articles populaires

- [Manuel] Introduction à Cacti
- [Tutoriel] Ajout d’un script dans les commandes Nagios
- [Nagios] Surveillance des disques RAID sous Linux
- [OpenLDAP] Start/stop script
- Fichiers de configurations Samba
- JMX (Java Management eXtensions)
- [OpenLDAP] Script de démarrage et d’arrêt
- [Nagios] Supervision of OpenLDAP’s replication status

 © Linagora.com

Accueil > Contributions > Cacti > [Cacti] OpenLDAP response time

[Cacti] OpenLDAP response time

version 0.1

Presentation

The script openldap_response_time.pl calculate the time used to:
- bind (anonymous or not)
- search on RootDSE (with scope base)
- search with scope sub 20 entries (max) below the suffix, found with the search on the RootDSE.

It is compatible with all LDAP directories respecting LDAPv2 or LDAPv3 RFC.

The following Perl modules are used, they must be installed before running the script:
- Module Getopt::Std
- Module Net::LDAP
- Pragma strict
- Subroutine gettimeofday() of module Time::HiRes

This script enables Cacti to produce graphics like this one:

Usage

This script works this way:


perl openldap_response_time.pl -h host [-p port] [-D binddn -W bindpw] [-t timeout] [-v ldap_version]

Mandatory parameters are:
- hostname: name or IP of the LDAP directory.

Optional parameters are:
- port: port of the LDAP directory. If not defined, the value "389" will be used.
- binddn: DN (LDAP account) with read rights on RootDSE and below suffix. This option is required if read rights are not enabled by default on these elements.
- bindpw: Password linked to the DN defined in parameter binddn.
- timeout: maximum time to wait for LDAP connection to be established. By default its value is 5 seconds.
- ldap_version: LDAP protocol version to use, it is version 3 by default.

Installation

Copy the perl program to the Cacti scripts directory. If Cacti was installed with the offical archive, the directory is /var/www/html/cacti/scripts, for Debian it is /usr/share/cacti/site/scripts.

Set the same rights and user/group on the program as the other scripts in the directory.

For recent versions of Cacti, the rest of the installation can be done with an XML import:
- Log in as root on Cacti’s administration interface.
- Click on Import Templates in menu Import/Export.
- Upload the XML file and save.

For the others, you have to set by hand:
- a data collection method (Data Input Method),
- a data source template (Data Template),
- a graphic template (Graph Template).

When templates are created, you can begin to create data sources and graphics! For help, please see tutorials on Cacti’s homepage.

Download

Perl script for data collection :

texte - 4.8 kb
Perl script - (.txt -> .pl)

XML export of data source and graphic templates :

XML - 19 kb
XML templates

Copyright (C) 2005 Clément OUDOT

Copyright (C) 2005 LINAGORA

GNU public license (GPL)

 Qui sommes nous ?

Dernière mise à jour : 27/08/2008
XHTML - SPIP 1.9.2