openldap/servers/slapd/back-monitor
Kurt Zeilenga 8c152396b9 Matched Values implementation (ITS#1776) based upon submission
form Mikhail Sahalaev <M.Sahalayev@pgr.salford.ac.uk>.
Further work needed:
	add testxxx-matchedvalues
	rework ldapsearch(1) portion of patch to generalize use of options
---
Copyright 2001, Mikhail Sahalaev, All rights reserved.
This software is not subject to any license of University Of
Salford.

Redistribution and use in source and binary forms are permitted
without restriction or fee of any kind as long as this notice
is preserved.
2002-05-02 18:56:56 +00:00
..
back-monitor.h minor improvement 2002-04-02 11:51:05 +00:00
backend.c Mostly based on patches provided by Hallvard B. Furuseth 2002-04-08 09:43:22 +00:00
backmon.dsp Add time.c 2002-01-29 17:25:04 +00:00
bind.c
cache.c partial fulfilment of ITS#1710 2002-04-02 12:27:06 +00:00
compare.c fix for acl state 2002-02-09 09:05:40 +00:00
conn.c missing description in current cunnections number 2002-04-03 15:42:54 +00:00
Copyright
database.c Changed be_[n]suffix, be_[n]suffixAlias to BerVarray. No more bvec's anywhere. 2002-05-01 18:50:14 +00:00
entry.c
external.h
init.c Matched Values implementation (ITS#1776) based upon submission 2002-05-02 18:56:56 +00:00
listener.c Remove lint 2002-01-28 20:22:57 +00:00
log.c ITS#1733 eliminate o_abandonmutex 2002-04-11 08:08:42 +00:00
Makefile.in add Time subsystem 2002-01-29 12:15:13 +00:00
modify.c
operation.c ... and log initiated/completed operations divided per request 2002-04-08 18:41:47 +00:00
operational.c
proto-back-monitor.h add Time subsystem 2002-01-29 12:15:13 +00:00
README Mostly based on patches provided by Hallvard B. Furuseth 2002-04-08 09:43:22 +00:00
rww.c
search.c
sent.c
thread.c
time.c Mostly based on patches provided by Hallvard B. Furuseth 2002-04-08 09:43:22 +00:00

MONITOR BACKEND

	NAME: 	back-monitor

	Backend for monitoring the server's activity.



COMPILE AND CONFIGURATION OPTIONS

It must be explicitly enabled by configuring with 

	--enable-monitor

set; then it must be activated by placing in slapd.conf the database
configure directive

	database	monitor

The suffix "cn=Monitor" is implicitly activated (it cannot be given
as a suffix of the database as usually done for conventional backends).
Note that the "cn=Monitor" naming context appears in the rootDSE
(FIXME: do we really want this?)

A bind operation is provided; at present it allows to bind as the
backend rootdn.  As a result, the backend supports the rootdn/rootpw 
directives (only simple bind at present).



NAMING CONTEXT AND TREE STRUCTURE

The backend naming context is "cn=Monitor"; the first level entries 
represent the monitored subsystems.  It is implemented in a modular way,
to ease the addition of new subsystems.



SCHEMA

All the subsystems get a default "cn" attribute, represented by the
subsystem's name, and they all have "top", "monitor" and "extensibleObject"
objectclasses.
"extensibleObject" is used, and the "description" attribute 
is used to hold the monitor information of each entry.



FUNCTIONALITY

Most of the sybsystems contain an additional depth level, represented
by detailed item monitoring.
All the entries undergo an update operation, if a related method is
defined, prior to being returned.  Moreover, there's a mechanism to
allow volatile entries to be defined, and generated on the fly when
requested.  As an instance, the connection statistics are updated
at each request, while each active connection data is created on the
fly.

One nice feature of this solution is that granular ACLs can be applied 
to each entry.



OPERATIONS

The backend currently supports:

	bind
	compare
	modify
	search



SUBSYSTEMS

Currently some subsystems are partially supported.  "Partially"
means their entries are correctly generated, but sometimes only 
partially useful information is provided.

The subsystems are:

	Listener
	Databases
	Backends
	Threads
	SASL
	TLS
	Connections
	Read Waiters
	Write Waiters
	Log
	Operations
	Statistics
	Time



LISTENER SUBSYSTEM

It contains the description of the devices the server is currently 
listening on



DATABASES SUBSYSTEM

The main entry contains the naming context of each configured database; 
the subentries contain, for each database, the type and the naming
context.



BACKENDS SUBSYSTEMS

The main entry contains the type of backends enabled at compile time;
the subentries, for each backend, contain the type of the backend.
It should also contain the modules that have been loaded if dynamic 
backends are enabled.



THREADS SUBSYSTEM

It contains the maximum number of threads enabled at startup and the 
current backload.



SASL

Currently empty.



TLS

Currently empty.



CONNECTIONS

The main entry is empty; it should contain some statistics on the number 
of connections.
Dynamic subentries are created for each open connection, with stats on
the activity on that connection (the format will be detailed later).
There are two special subentries that show the number of total and
current connections respectively.



READ WAITERS SUBSYSTEM

It contains the number of current read waiters.



WRITE WAITERS SUBSYSTEM

It contains the number of current write waiters.



LOG SUBSYSTEM

It contains the currently active log items.  The "Log" subsystem allows 
user modify operations on the "description" attribute, whose values MUST 
be in the list of admittable log switches:

	Trace
	Packets
	Args
	Conns
	BER
	Filter
	Config		(useless)
	ACL
	Stats
	Stats2
	Shell
	Parse
	Cache		(deprecated)
	Index

These values can be added, replaced or deleted; they affect what 
messages are sent to the syslog device.



OPERATIONS SUBSYSTEM

It shows some statistics on the operations performed by the server:

	Initiated
	Completed



SENT SUBSYSTEM

It shows some statistics on the data sent by the server:

	Bytes
	PDU
	Referrals
	Entries



TIME SUBSISTEM

It contains two subentries with the start time and the current time 
of the server.



NOTES

This document is in a very early stage of maturity and will 
probably be rewritten many times before the monitor backend is released.



AUTHOR:	Pierangelo Masarati <ando@OpenLDAP.org>