1 /* init.c - initialize monitor backend */
3 * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
7 * Copyright 2001, Pierangelo Masarati, All rights reserved. <ando@sys-net.it>
9 * This work has beed deveolped for the OpenLDAP Foundation
10 * in the hope that it may be useful to the Open Source community,
11 * but WITHOUT ANY WARRANTY.
13 * Permission is granted to anyone to use this software for any purpose
14 * on any computer system, and to alter it and redistribute it, subject
15 * to the following restrictions:
17 * 1. The author and SysNet s.n.c. are not responsible for the consequences
18 * of use of this software, no matter how awful, even if they arise from
21 * 2. The origin of this software must not be misrepresented, either by
22 * explicit claim or by omission. Since few users ever read sources,
23 * credits should appear in the documentation.
25 * 3. Altered versions must be plainly marked as such, and must not be
26 * misrepresented as being the original software. Since few users
27 * ever read sources, credits should appear in the documentation.
28 * SysNet s.n.c. cannot be responsible for the consequences of the
31 * 4. This notice may not be removed or altered.
37 #include <ac/string.h>
41 #include "back-monitor.h"
44 * used by many functions to add description to entries
46 BackendDB *be_monitor = NULL;
51 struct monitorsubsys monitor_subsys[] = {
53 SLAPD_MONITOR_LISTENER, SLAPD_MONITOR_LISTENER_NAME,
54 BER_BVNULL, BER_BVNULL, BER_BVNULL,
55 MONITOR_F_PERSISTENT_CH,
56 monitor_subsys_listener_init,
61 SLAPD_MONITOR_DATABASE, SLAPD_MONITOR_DATABASE_NAME,
62 BER_BVNULL, BER_BVNULL, BER_BVNULL,
63 MONITOR_F_PERSISTENT_CH,
64 monitor_subsys_database_init,
69 SLAPD_MONITOR_BACKEND, SLAPD_MONITOR_BACKEND_NAME,
70 BER_BVNULL, BER_BVNULL, BER_BVNULL,
71 MONITOR_F_PERSISTENT_CH,
72 monitor_subsys_backend_init,
77 SLAPD_MONITOR_THREAD, SLAPD_MONITOR_THREAD_NAME,
78 BER_BVNULL, BER_BVNULL, BER_BVNULL,
80 monitor_subsys_thread_init,
81 monitor_subsys_thread_update,
85 SLAPD_MONITOR_SASL, SLAPD_MONITOR_SASL_NAME,
86 BER_BVNULL, BER_BVNULL, BER_BVNULL,
93 SLAPD_MONITOR_TLS, SLAPD_MONITOR_TLS_NAME,
94 BER_BVNULL, BER_BVNULL, BER_BVNULL,
101 SLAPD_MONITOR_CONN, SLAPD_MONITOR_CONN_NAME,
102 BER_BVNULL, BER_BVNULL, BER_BVNULL,
103 MONITOR_F_VOLATILE_CH,
104 monitor_subsys_conn_init,
105 monitor_subsys_conn_update,
106 monitor_subsys_conn_create,
109 SLAPD_MONITOR_RWW, SLAPD_MONITOR_RWW_NAME,
110 BER_BVNULL, BER_BVNULL, BER_BVNULL,
111 MONITOR_F_PERSISTENT_CH,
112 monitor_subsys_rww_init,
113 monitor_subsys_rww_update,
117 SLAPD_MONITOR_LOG, SLAPD_MONITOR_LOG_NAME,
118 BER_BVNULL, BER_BVNULL, BER_BVNULL,
120 monitor_subsys_log_init,
123 monitor_subsys_log_modify
125 SLAPD_MONITOR_OPS, SLAPD_MONITOR_OPS_NAME,
126 BER_BVNULL, BER_BVNULL, BER_BVNULL,
127 MONITOR_F_PERSISTENT_CH,
128 monitor_subsys_ops_init,
129 monitor_subsys_ops_update,
133 SLAPD_MONITOR_SENT, SLAPD_MONITOR_SENT_NAME,
134 BER_BVNULL, BER_BVNULL, BER_BVNULL,
135 MONITOR_F_PERSISTENT_CH,
136 monitor_subsys_sent_init,
137 monitor_subsys_sent_update,
141 SLAPD_MONITOR_TIME, SLAPD_MONITOR_TIME_NAME,
142 BER_BVNULL, BER_BVNULL, BER_BVNULL,
143 MONITOR_F_PERSISTENT_CH,
144 monitor_subsys_time_init,
145 monitor_subsys_time_update,
151 #ifdef SLAPD_MONITOR_DYNAMIC
154 back_monitor_LTX_init_module( int argc, char *argv[] )
158 memset( &bi, '\0', sizeof(bi) );
159 bi.bi_type = "monitor";
160 bi.bi_init = monitor_back_initialize;
165 #endif /* SLAPD_MONITOR_DYNAMIC */
168 monitor_back_initialize(
172 static char *controls[] = {
173 LDAP_CONTROL_MANAGEDSAIT,
174 LDAP_CONTROL_VALUESRETURNFILTER,
178 bi->bi_controls = controls;
182 bi->bi_config = monitor_back_config;
186 bi->bi_db_init = monitor_back_db_init;
187 bi->bi_db_config = monitor_back_db_config;
188 bi->bi_db_open = monitor_back_db_open;
190 bi->bi_db_destroy = monitor_back_db_destroy;
192 bi->bi_op_bind = monitor_back_bind;
193 bi->bi_op_unbind = 0;
194 bi->bi_op_search = monitor_back_search;
195 bi->bi_op_compare = monitor_back_compare;
196 bi->bi_op_modify = monitor_back_modify;
197 bi->bi_op_modrdn = 0;
199 bi->bi_op_delete = 0;
200 bi->bi_op_abandon = 0;
204 bi->bi_entry_release_rw = 0;
205 bi->bi_chk_referrals = 0;
206 bi->bi_operational = monitor_back_operational;
209 * hooks for slap tools
211 bi->bi_tool_entry_open = 0;
212 bi->bi_tool_entry_close = 0;
213 bi->bi_tool_entry_first = 0;
214 bi->bi_tool_entry_next = 0;
215 bi->bi_tool_entry_get = 0;
216 bi->bi_tool_entry_put = 0;
217 bi->bi_tool_entry_reindex = 0;
218 bi->bi_tool_sync = 0;
220 bi->bi_connection_init = 0;
221 bi->bi_connection_destroy = 0;
227 monitor_back_db_init(
231 struct monitorinfo *mi;
233 struct berval dn, ndn;
237 * database monitor can be defined once only
241 LDAP_LOG( OPERATION, CRIT,
242 "only one monitor backend is allowed\n", 0, 0, 0);
244 Debug( LDAP_DEBUG_ANY,
245 "only one monitor backend is allowed\n", 0, 0, 0 );
251 /* indicate system schema supported */
252 be->be_flags |= SLAP_BFLAG_MONITOR;
254 dn.bv_val = SLAPD_MONITOR_DN;
255 dn.bv_len = sizeof( SLAPD_MONITOR_DN ) - 1;
257 rc = dnNormalize( 0, NULL, NULL, &dn, &ndn, NULL );
258 if( rc != LDAP_SUCCESS ) {
260 LDAP_LOG( OPERATION, CRIT,
261 "unable to normalize monitor DN \"" SLAPD_MONITOR_DN
264 Debug( LDAP_DEBUG_ANY,
265 "unable to normalize monitor DN \"" SLAPD_MONITOR_DN
271 ber_dupbv( &bv, &dn );
272 ber_bvarray_add( &be->be_suffix, &bv );
273 ber_bvarray_add( &be->be_nsuffix, &ndn );
275 mi = ( struct monitorinfo * )ch_calloc( sizeof( struct monitorinfo ), 1 );
278 LDAP_LOG( OPERATION, CRIT,
279 "unable to initialize monitor backend\n", 0, 0, 0 );
281 Debug( LDAP_DEBUG_ANY,
282 "unable to initialize monitor backend\n", 0, 0, 0 );
287 memset( mi, 0, sizeof( struct monitorinfo ) );
289 ldap_pvt_thread_mutex_init( &mi->mi_cache_mutex );
297 monitor_back_db_open(
301 struct monitorinfo *mi = (struct monitorinfo *)be->be_private;
302 struct monitorsubsys *ms;
304 struct monitorentrypriv *mp;
306 char buf[ BACKMONITOR_BUFSIZE ], *end_of_line;
314 { "monitor", "( 1.3.6.1.4.1.4203.666.3.2 "
316 "DESC 'OpenLDAP system monitoring' "
317 "SUP top STRUCTURAL "
330 offsetof(struct monitorinfo, oc_monitor) },
331 { "monitorServer", "( 1.3.6.1.4.1.4203.666.3.7 "
332 "NAME 'monitorServer' "
333 "DESC 'Server monitoring root entry' "
334 "SUP monitor STRUCTURAL )",
335 offsetof(struct monitorinfo, oc_monitorServer) },
336 { "monitorContainer", "( 1.3.6.1.4.1.4203.666.3.8 "
337 "NAME 'monitorContainer' "
338 "DESC 'monitor container class' "
339 "SUP monitor STRUCTURAL )",
340 offsetof(struct monitorinfo, oc_monitorContainer) },
341 { "monitorCounterObject", "( 1.3.6.1.4.1.4203.666.3.9 "
342 "NAME 'monitorCounterObject' "
343 "DESC 'monitor counter class' "
344 "SUP monitor STRUCTURAL )",
345 offsetof(struct monitorinfo, oc_monitorCounterObject) },
346 { "monitorOperation", "( 1.3.6.1.4.1.4203.666.3.10 "
347 "NAME 'monitorOperation' "
348 "DESC 'monitor operation class' "
349 "SUP monitor STRUCTURAL )",
350 offsetof(struct monitorinfo, oc_monitorOperation) },
351 { "monitorConnection", "( 1.3.6.1.4.1.4203.666.3.11 "
352 "NAME 'monitorConnection' "
353 "DESC 'monitor connection class' "
354 "SUP monitor STRUCTURAL )",
355 offsetof(struct monitorinfo, oc_monitorConnection) },
356 { "managedObject", "( 1.3.6.1.4.1.4203.666.3.12 "
357 "NAME 'managedObject' "
358 "DESC 'monitor managed entity class' "
359 "SUP monitor STRUCTURAL )",
360 offsetof(struct monitorinfo, oc_managedObject) },
361 { "monitoredObject", "( 1.3.6.1.4.1.4203.666.3.13 "
362 "NAME 'monitoredObject' "
363 "DESC 'monitor monitored entity class' "
364 "SUP monitor STRUCTURAL )",
365 offsetof(struct monitorinfo, oc_monitoredObject) },
368 { "monitoredInfo", "( 1.3.6.1.4.1.4203.666.1.14 "
369 "NAME 'monitoredInfo' "
370 "DESC 'monitored info' "
372 "EQUALITY caseIgnoreMatch "
373 "SUBSTR caseIgnoreSubstringsMatch "
374 "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} "
375 "NO-USER-MODIFICATION "
376 "USAGE directoryOperation )",
377 offsetof(struct monitorinfo, ad_monitoredInfo) },
378 { "managedInfo", "( 1.3.6.1.4.1.4203.666.1.15 "
379 "NAME 'managedInfo' "
380 "DESC 'monitor managed info' "
382 offsetof(struct monitorinfo, ad_managedInfo) },
383 { "monitorCounter", "( 1.3.6.1.4.1.4203.666.1.16 "
384 "NAME 'monitorCounter' "
385 "DESC 'monitor counter' "
386 "EQUALITY integerMatch "
387 "ORDERING integerOrderingMatch "
388 "SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 "
389 "NO-USER-MODIFICATION "
390 "USAGE directoryOperation )",
391 offsetof(struct monitorinfo, ad_monitorCounter) },
392 { "monitorOpCompleted", "( 1.3.6.1.4.1.4203.666.1.17 "
393 "NAME 'monitorOpCompleted' "
394 "DESC 'monitor completed operations' "
395 "SUP monitorCounter "
396 "NO-USER-MODIFICATION "
397 "USAGE directoryOperation )",
398 offsetof(struct monitorinfo, ad_monitorOpCompleted) },
399 { "monitorOpInitiated", "( 1.3.6.1.4.1.4203.666.1.18 "
400 "NAME 'monitorOpInitiated' "
401 "DESC 'monitor initiated operations' "
402 "SUP monitorCounter "
403 "NO-USER-MODIFICATION "
404 "USAGE directoryOperation )",
405 offsetof(struct monitorinfo, ad_monitorOpInitiated) },
406 { "monitorConnectionNumber", "( 1.3.6.1.4.1.4203.666.1.19 "
407 "NAME 'monitorConnectionNumber' "
408 "DESC 'monitor connection number' "
409 "SUP monitorCounter "
410 "NO-USER-MODIFICATION "
411 "USAGE directoryOperation )",
412 offsetof(struct monitorinfo, ad_monitorConnectionNumber) },
413 { "monitorConnectionAuthzDN", "( 1.3.6.1.4.1.4203.666.1.20 "
414 "NAME 'monitorConnectionAuthzDN' "
415 "DESC 'monitor connection authorization DN' "
416 /* "SUP distinguishedName " */
417 "EQUALITY distinguishedNameMatch "
418 "SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 "
419 "NO-USER-MODIFICATION "
420 "USAGE directoryOperation )",
421 offsetof(struct monitorinfo, ad_monitorConnectionAuthzDN) },
422 { "monitorConnectionLocalAddress", "( 1.3.6.1.4.1.4203.666.1.21 "
423 "NAME 'monitorConnectionLocalAddress' "
424 "DESC 'monitor connection local address' "
426 "NO-USER-MODIFICATION "
427 "USAGE directoryOperation )",
428 offsetof(struct monitorinfo, ad_monitorConnectionLocalAddress) },
429 { "monitorConnectionPeerAddress", "( 1.3.6.1.4.1.4203.666.1.22 "
430 "NAME 'monitorConnectionPeerAddress' "
431 "DESC 'monitor connection peer address' "
433 "NO-USER-MODIFICATION "
434 "USAGE directoryOperation )",
435 offsetof(struct monitorinfo, ad_monitorConnectionPeerAddress) },
439 for ( i = 0; mat[i].name; i++ ) {
440 LDAPAttributeType *at;
443 AttributeDescription **ad;
445 at = ldap_str2attributetype( mat[i].schema, &code,
446 &err, LDAP_SCHEMA_ALLOW_ALL );
449 LDAP_LOG( OPERATION, CRIT, "monitor_back_db_init: "
450 "in AttributeType '%s' %s before %s\n",
451 mat[i].name, ldap_scherr2str(code), err );
453 Debug( LDAP_DEBUG_ANY, "monitor_back_db_init: "
454 "in AttributeType '%s' %s before %s\n",
455 mat[i].name, ldap_scherr2str(code), err );
460 if ( at->at_oid == NULL ) {
462 LDAP_LOG( OPERATION, CRIT, "monitor_back_db_init: "
463 "null OID for attributeType '%s'\n",
466 Debug( LDAP_DEBUG_ANY, "monitor_back_db_init: "
467 "null OID for attributeType '%s'\n",
473 code = at_add(at, &err);
476 LDAP_LOG( OPERATION, CRIT, "monitor_back_db_init: "
477 "%s in attributeType '%s'\n",
478 scherr2str(code), mat[i].name, 0 );
480 Debug( LDAP_DEBUG_ANY, "monitor_back_db_init: "
481 "%s in attributeType '%s'\n",
482 scherr2str(code), mat[i].name, 0 );
488 ad = ((AttributeDescription **)&(((char *)mi)[mat[i].offset]));
490 if ( slap_str2ad( mat[i].name, ad, &text ) ) {
492 LDAP_LOG( OPERATION, CRIT,
493 "monitor_back_db_init: %s\n", text, 0, 0 );
495 Debug( LDAP_DEBUG_ANY,
496 "monitor_back_db_init: %s\n", text, 0, 0 );
502 if ( slap_str2ad( "description", &mi->ad_description, &text ) ) {
504 LDAP_LOG( OPERATION, CRIT,
505 "monitor_back_db_init: description: %s\n", text, 0, 0 );
507 Debug( LDAP_DEBUG_ANY,
508 "monitor_back_db_init: description: %s\n", text, 0, 0 );
513 if ( slap_str2ad( "seeAlso", &mi->ad_seeAlso, &text ) ) {
515 LDAP_LOG( OPERATION, CRIT,
516 "monitor_back_db_init: seeAlso: %s\n", text, 0, 0 );
518 Debug( LDAP_DEBUG_ANY,
519 "monitor_back_db_init: seeAlso: %s\n", text, 0, 0 );
524 for ( i = 0; moc[i].name; i++ ) {
530 oc = ldap_str2objectclass(moc[i].schema, &code, &err,
531 LDAP_SCHEMA_ALLOW_ALL );
534 LDAP_LOG( OPERATION, CRIT,
535 "unable to parse monitor objectclass '%s': "
536 "%s before %s\n" , moc[i].name,
537 ldap_scherr2str(code), err );
539 Debug( LDAP_DEBUG_ANY,
540 "unable to parse monitor objectclass '%s': "
541 "%s before %s\n" , moc[i].name,
542 ldap_scherr2str(code), err );
547 if ( oc->oc_oid == NULL ) {
549 LDAP_LOG( OPERATION, CRIT,
550 "objectclass '%s' has no OID\n" ,
553 Debug( LDAP_DEBUG_ANY,
554 "objectclass '%s' has no OID\n" ,
560 code = oc_add(oc, 0, &err);
563 LDAP_LOG( OPERATION, CRIT,
564 "objectclass '%s': %s \"%s\"\n" ,
565 moc[i].name, scherr2str(code), err );
567 Debug( LDAP_DEBUG_ANY,
568 "objectclass '%s': %s \"%s\"\n" ,
569 moc[i].name, scherr2str(code), err );
576 Oc = oc_find( moc[i].name );
579 LDAP_LOG( OPERATION, CRIT, "monitor_back_db_init: "
580 "unable to find objectClass %s "
581 "(just added)\n", moc[i].name, 0, 0 );
583 Debug( LDAP_DEBUG_ANY, "monitor_back_db_init: "
584 "unable to find objectClass %s "
585 "(just added)\n", moc[i].name, 0, 0 );
590 ((ObjectClass **)&(((char *)mi)[moc[i].offset]))[0] = Oc;
594 * Create all the subsystem specific entries
597 for ( i = 0; monitor_subsys[ i ].mss_name != NULL; i++ ) {
598 int len = strlen( monitor_subsys[ i ].mss_name );
602 dn.bv_len = len + sizeof( "cn=" ) - 1;
603 dn.bv_val = ch_calloc( sizeof( char ), dn.bv_len + 1 );
604 strcpy( dn.bv_val, "cn=" );
605 strcat( dn.bv_val, monitor_subsys[ i ].mss_name );
606 rc = dnPretty( NULL, &dn, &monitor_subsys[ i ].mss_rdn, NULL );
608 if ( rc != LDAP_SUCCESS ) {
610 LDAP_LOG( OPERATION, CRIT,
611 "monitor RDN \"%s\" is invalid\n",
614 Debug( LDAP_DEBUG_ANY,
615 "monitor RDN \"%s\" is invalid\n",
621 dn.bv_len += sizeof( SLAPD_MONITOR_DN ); /* 1 for the , */
622 dn.bv_val = ch_malloc( dn.bv_len + 1 );
623 strcpy( dn.bv_val , monitor_subsys[ i ].mss_rdn.bv_val );
624 strcat( dn.bv_val, "," SLAPD_MONITOR_DN );
625 rc = dnPrettyNormal( NULL, &dn, &monitor_subsys[ i ].mss_dn,
626 &monitor_subsys[ i ].mss_ndn, NULL );
628 if ( rc != LDAP_SUCCESS ) {
630 LDAP_LOG( OPERATION, CRIT,
631 "monitor DN \"%s\" is invalid\n",
634 Debug( LDAP_DEBUG_ANY,
635 "monitor DN \"%s\" is invalid\n",
641 snprintf( buf, sizeof( buf ),
644 "structuralObjectClass: %s\n"
646 monitor_subsys[ i ].mss_dn.bv_val,
647 mi->oc_monitorContainer->soc_cname.bv_val,
648 mi->oc_monitorContainer->soc_cname.bv_val,
649 monitor_subsys[ i ].mss_name );
651 e = str2entry( buf );
655 LDAP_LOG( OPERATION, CRIT,
656 "unable to create '%s' entry\n",
657 monitor_subsys[ i ].mss_dn.bv_val, 0, 0 );
659 Debug( LDAP_DEBUG_ANY,
660 "unable to create '%s' entry\n",
661 monitor_subsys[ i ].mss_dn.bv_val, 0, 0 );
666 mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
667 e->e_private = ( void * )mp;
668 mp->mp_info = &monitor_subsys[ i ];
669 mp->mp_children = NULL;
671 mp->mp_flags = monitor_subsys[ i ].mss_flags;
673 if ( monitor_cache_add( mi, e ) ) {
675 LDAP_LOG( OPERATION, CRIT,
676 "unable to add entry '%s' to cache\n",
677 monitor_subsys[ i ].mss_dn.bv_val, 0, 0 );
679 Debug( LDAP_DEBUG_ANY,
680 "unable to add entry '%s' to cache\n",
681 monitor_subsys[ i ].mss_dn.bv_val, 0, 0 );
690 * creates the "cn=Monitor" entry
692 snprintf( buf, sizeof( buf ),
693 "dn: " SLAPD_MONITOR_DN "\n"
695 "structuralObjectClass: %s\n"
697 "%s: This subtree contains monitoring/managing objects.\n"
698 "%s: This object contains information about this server.\n"
699 "%s: createTimeStamp reflects the time this server instance was created.\n"
700 "%s: modifyTimeStamp reflects the current time.\n",
701 mi->oc_monitorServer->soc_cname.bv_val,
702 mi->oc_monitorServer->soc_cname.bv_val,
703 mi->ad_description->ad_cname.bv_val,
704 mi->ad_description->ad_cname.bv_val,
705 mi->ad_description->ad_cname.bv_val,
706 mi->ad_description->ad_cname.bv_val );
708 e = str2entry( buf );
711 LDAP_LOG( OPERATION, CRIT,
712 "unable to create '%s' entry\n",
713 SLAPD_MONITOR_DN, 0, 0 );
715 Debug( LDAP_DEBUG_ANY,
716 "unable to create '%s' entry\n",
717 SLAPD_MONITOR_DN, 0, 0 );
722 bv.bv_val = (char *) Versionstr;
723 end_of_line = strchr( Versionstr, '\n' );
725 bv.bv_len = end_of_line - Versionstr;
727 bv.bv_len = strlen( Versionstr );
730 if ( attr_merge_normalize_one( e, mi->ad_monitoredInfo,
733 LDAP_LOG( OPERATION, CRIT,
734 "unable to add monitoredInfo to '%s' entry\n",
735 SLAPD_MONITOR_DN, 0, 0 );
737 Debug( LDAP_DEBUG_ANY,
738 "unable to add monitoredInfo to '%s' entry\n",
739 SLAPD_MONITOR_DN, 0, 0 );
744 if ( mi->l.bv_len ) {
745 AttributeDescription *ad = NULL;
746 const char *text = NULL;
748 if ( slap_str2ad( "l", &ad, &text ) ) {
750 LDAP_LOG( OPERATION, CRIT, "unable to get 'l'\n",
751 SLAPD_MONITOR_DN, 0, 0 );
753 Debug( LDAP_DEBUG_ANY, "unable to get 'l'\n",
754 SLAPD_MONITOR_DN, 0, 0 );
759 if ( attr_merge_normalize_one( e, ad, &mi->l, NULL ) ) {
761 LDAP_LOG( OPERATION, CRIT,
762 "unable to add locality to '%s' entry\n",
763 SLAPD_MONITOR_DN, 0, 0 );
765 Debug( LDAP_DEBUG_ANY,
766 "unable to add locality to '%s' entry\n",
767 SLAPD_MONITOR_DN, 0, 0 );
773 mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
774 e->e_private = ( void * )mp;
777 mp->mp_children = e_tmp;
780 if ( monitor_cache_add( mi, e ) ) {
782 LDAP_LOG( OPERATION, CRIT,
783 "unable to add entry '%s' to cache\n",
784 SLAPD_MONITOR_DN, 0, 0 );
786 Debug( LDAP_DEBUG_ANY,
787 "unable to add entry '%s' to cache\n",
788 SLAPD_MONITOR_DN, 0, 0 );
798 * opens the monitor backend
800 for ( ms = monitor_subsys; ms->mss_name != NULL; ms++ ) {
801 if ( ms->mss_init && ( *ms->mss_init )( be ) ) {
819 * eventually, will hold backend specific configuration parameters
825 monitor_back_db_config(
833 struct monitorinfo *mi = (struct monitorinfo *)be->be_private;
836 * eventually, will hold database specific configuration parameters
838 if ( strcasecmp( argv[ 0 ], "l" ) == 0 ) {
843 ber_str2bv( argv[ 1 ], 0, 1, &mi->l );
847 LDAP_LOG( CONFIG, INFO,
848 "line %d of file '%s' will be ignored\n",
851 Debug( LDAP_DEBUG_CONFIG,
852 "line %d of file '%s' will be ignored\n",
861 monitor_back_db_destroy(
866 * FIXME: destroys all the data