* DNs
*/
#define SLAPD_MONITOR_LISTENER 0
-#define SLAPD_MONITOR_LISTENER_NAME "Listener"
+#define SLAPD_MONITOR_LISTENER_NAME "Listeners"
#define SLAPD_MONITOR_LISTENER_RDN \
"cn=" SLAPD_MONITOR_LISTENER_NAME
#define SLAPD_MONITOR_LISTENER_DN \
SLAPD_MONITOR_OPS_RDN "," SLAPD_MONITOR_DN
#define SLAPD_MONITOR_SENT 11
-#define SLAPD_MONITOR_SENT_NAME "Sent"
+#define SLAPD_MONITOR_SENT_NAME "Statistics"
#define SLAPD_MONITOR_SENT_RDN \
"cn=" SLAPD_MONITOR_SENT_NAME
#define SLAPD_MONITOR_SENT_DN \
bi = &backendInfo[i];
snprintf( buf, sizeof( buf ),
- "dn: cn=%d,%s\n"
+ "dn: cn=Backend %d,%s\n"
SLAPD_MONITOR_OBJECTCLASSES
- "cn: %d\n",
+ "cn: Backend %d\n",
i,
monitor_subsys[SLAPD_MONITOR_BACKEND].mss_dn.bv_val,
i );
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
"monitor_subsys_backend_init: "
- "unable to create entry 'cn=%d,%s'\n",
+ "unable to create entry 'cn=Backend %d,%s'\n",
i,
monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn.bv_val ));
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_backend_init: "
- "unable to create entry 'cn=%d,%s'\n%s",
+ "unable to create entry 'Backend cn=%d,%s'\n%s",
i,
monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn.bv_val,
"" );
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
"monitor_subsys_backend_init: "
- "unable to add entry 'cn=%d,%s'\n",
+ "unable to add entry 'cn=Backend %d,%s'\n",
i,
monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn.bv_val ));
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_backend_init: "
- "unable to add entry 'cn=%d,%s'\n%s",
+ "unable to add entry 'cn=Backend %d,%s'\n%s",
i,
monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn.bv_val,
"" );
assert( ep != NULL );
snprintf( buf, sizeof( buf ),
- "dn: cn=%ld,%s\n"
+ "dn: cn=Connection %ld,%s\n"
SLAPD_MONITOR_OBJECTCLASSES
- "cn: %ld\n",
+ "cn: Connection %ld\n",
c->c_connid, monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val,
c->c_connid );
e = str2entry( buf );
LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
"monitor_subsys_conn_create: "
"unable to create entry "
- "'cn=%ld,%s' entry\n",
+ "'cn=Connection %ld,%s' entry\n",
c->c_connid,
monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val ));
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_conn_create: "
"unable to create entry "
- "'cn=%ld,%s' entry\n",
+ "'cn=Connection %ld,%s' entry\n",
c->c_connid,
monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val, 0 );
#endif
int i;
struct monitorentrypriv *mp;
AttributeDescription *ad_nc = slap_schema.si_ad_namingContexts;
+ AttributeDescription *ad_seeAlso = NULL;
+ const char *text = NULL;
struct berval bv[2];
assert( be != NULL );
return( -1 );
}
+ if ( slap_str2ad( "seeAlso", &ad_seeAlso, &text ) != LDAP_SUCCESS ) {
+ return( -1 );
+ }
+
e_tmp = NULL;
for ( i = nBackendDB; i--; ) {
char buf[1024];
be = &backendDB[i];
snprintf( buf, sizeof( buf ),
- "dn: cn=%d,%s\n"
+ "dn: cn=Database %d,%s\n"
SLAPD_MONITOR_OBJECTCLASSES
- "cn: %d\n",
+ "cn: Database %d\n"
+ "description: %s",
i,
monitor_subsys[SLAPD_MONITOR_DATABASE].mss_dn.bv_val,
- i );
+ i,
+ be->bd_info->bi_type );
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
"monitor_subsys_database_init: "
- "unable to create entry 'cn=%d,%s'\n",
+ "unable to create entry 'cn=Database %d,%s'\n",
i,
monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn.bv_val ));
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_database_init: "
- "unable to create entry 'cn=%d,%s'\n%s",
+ "unable to create entry 'cn=Database %d,%s'\n%s",
i,
monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn.bv_val,
"" );
return( -1 );
}
- bv[1].bv_val = NULL;
- bv[0].bv_val = be->bd_info->bi_type;
- bv[0].bv_len = strlen( bv[0].bv_val );
- attr_merge( e, monitor_ad_desc, bv );
-
for ( j = 0; be->be_suffix[j]; j++ ) {
bv[0] = *be->be_suffix[j];
attr_merge( e, ad_nc, bv );
attr_merge( e_database, ad_nc, bv );
}
-
+
+ for ( j = nBackendInfo; j--; ) {
+ if ( &backendInfo[ j ] == be->bd_info ) {
+ /* we check the pointer; the test on the
+ * string should be more reliable */
+ assert( strcasecmp( backendInfo[ j ].bi_type,
+ be->bd_info->bi_type ) == 0 );
+
+ snprintf( buf, sizeof( buf ),
+ "cn=Backend %d,%s",
+ j, monitor_subsys[SLAPD_MONITOR_BACKEND].mss_dn.bv_val );
+ bv->bv_val = buf;
+ bv->bv_len = strlen( buf );
+ attr_merge( e, ad_seeAlso, bv );
+ break;
+ }
+ }
+ /* we must find it! */
+ assert( j >= 0 );
+
mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
e->e_private = ( void * )mp;
mp->mp_next = e_tmp;
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
"monitor_subsys_database_init: "
- "unable to add entry 'cn=%d,%s'\n",
+ "unable to add entry 'cn=Database %d,%s'\n",
i,
monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn.bv_val ));
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_database_init: "
- "unable to add entry 'cn=%d,%s'\n",
+ "unable to add entry 'cn=Database %d,%s'\n",
i,
monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn.bv_val,
0 );
}
e_tmp = NULL;
- for ( i = 0; l[i]; i++ ) {
+ for ( i = 0; l[i]; i++ );
+ for ( ; i--; ) {
char buf[1024];
snprintf( buf, sizeof( buf ),
- "dn: cn=%d,%s\n"
+ "dn: cn=Listener %d,%s\n"
SLAPD_MONITOR_OBJECTCLASSES
- "cn: %d\n"
+ "cn: Listener %d\n"
"description: %s\n"
"labeledURI: %s",
i,
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
"monitor_subsys_listener_init: "
- "unable to create entry 'cn=%s,%s'\n",
- l[i]->sl_name,
+ "unable to create entry 'cn=Listener, %d,%s'\n",
+ i,
monitor_subsys[SLAPD_MONITOR_LISTENER].mss_ndn.bv_val ));
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_listener_init: "
- "unable to create entry 'cn=%s,%s'\n%s",
- l[i]->sl_name,
+ "unable to create entry 'cn=Listener %d,%s'\n%s",
+ i,
monitor_subsys[SLAPD_MONITOR_LISTENER].mss_ndn.bv_val,
"" );
#endif
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
"monitor_subsys_listener_init: "
- "unable to add entry 'cn=%s,%s'\n",
- l[i]->sl_name,
+ "unable to add entry 'cn=Listener %d,%s'\n",
+ i,
monitor_subsys[SLAPD_MONITOR_LISTENER].mss_ndn.bv_val ));
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_listener_init: "
- "unable to add entry 'cn=%s,%s'\n",
- l[i]->sl_name,
+ "unable to add entry 'cn=Listener %d,%s'\n",
+ i,
monitor_subsys[SLAPD_MONITOR_LISTENER].mss_ndn.bv_val,
0 );
#endif
case AF_LOCAL:
sprintf( peername, "PATH=%s", from.sa_un_addr.sun_path );
ssf = LDAP_PVT_SASL_LOCAL_SSF;
+ dnsname = "local";
break;
#endif /* LDAP_PF_LOCAL */