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] Statistics on OpenLDAP operations

[Cacti] Statistics on OpenLDAP operations

version 0.1

Presentation

The script openldap_operations.pl connects to OpenLDAP monitor back-end and get counters of the following LDAP operations:
- Abandon
- Add
- Bind
- Compare
- Delete
- Extended
- Modify
- Modrdn
- Search
- Unbind

It is aimed for OpenLDAP versions older than 2.2, compiled with --enable-monitor option.

The following Perl modules are used, they must be installed before running the script:
- Module Getopt::Std
- Module Net::LDAP
- Pragma strict

This script enables Cacti to produce graphics like this one:

Usage

This script works this way:


perl openldap_operations.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 monitor branch. This option is required if read rights are not enabled by default on monitor branch.
- 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.1 kb
Perl script (.txt -> .pl)

XML export of data source and graphic templates :

XML - 46 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