* Databases monitor objectclasses 1.3.6.1.4.1.4203.666.3.16.0.1
* BDB database monitor objectclasses 1.3.6.1.4.1.4203.666.3.16.0.1.1
*/
-#define BDB_MONITOR_SCHEMA_AD "1.3.6.1.4.1.4203.666.1.55.0.1.1"
-#define BDB_MONITOR_SCHEMA_OC "1.3.6.1.4.1.4203.666.3.16.0.1.1"
static struct {
char *name;
char *ptr;
int rc = 0;
- bdb->bi_monitor_cleanup.bdm_scope = LDAP_SCOPE_ONELEVEL;
- base = &bdb->bi_monitor_cleanup.bdm_base;
- BER_BVSTR( base, "cn=databases,cn=monitor" );
- filter = &bdb->bi_monitor_cleanup.bdm_filter;
- BER_BVZERO( filter );
+ if ( !SLAP_DBMONITORING( be ) ) {
+ return 0;
+ }
/* don't bother if monitor is not configured */
if ( !monitor_back_is_configured() ) {
* base="cn=Databases,cn=Monitor", scope=LDAP_SCOPE_ONE
* and filter="(namingContexts:distinguishedNameMatch:=<suffix>)" */
+ bdb->bi_monitor_cleanup.bdm_scope = LDAP_SCOPE_ONELEVEL;
+ base = &bdb->bi_monitor_cleanup.bdm_base;
+ BER_BVSTR( base, "cn=databases,cn=monitor" );
+ filter = &bdb->bi_monitor_cleanup.bdm_filter;
+ BER_BVZERO( filter );
+
suffix.bv_len = ldap_bv2escaped_filter_value_len( &be->be_nsuffix[ 0 ] );
if ( suffix.bv_len == be->be_nsuffix[ 0 ].bv_len ) {
suffix = be->be_nsuffix[ 0 ];
CFG_TTHREADS,
CFG_MIRRORMODE,
CFG_HIDDEN,
+ CFG_MONITORING,
CFG_LAST
};
#endif
"( OLcfgGlAt:31 NAME 'olcModulePath' "
"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "monitoring", "TRUE|FALSE", 2, 2, 0,
+ ARG_MAGIC|CFG_MONITORING|ARG_DB|ARG_ON_OFF, &config_generic,
+ "( OLcfgDbAt:0.18 NAME 'olcMonitoring' "
+ "SYNTAX OMsBoolean SINGLE-VALUE )", NULL, NULL },
{ "objectclass", "objectclass", 2, 0, 0, ARG_PAREN|ARG_MAGIC|CFG_OC|ARG_NO_DELETE|ARG_NO_INSERT,
&config_generic, "( OLcfgGlAt:32 NAME 'olcObjectClasses' "
"DESC 'OpenLDAP object classes' "
"olcReplicaArgsFile $ olcReplicaPidFile $ olcReplicationInterval $ "
"olcReplogFile $ olcRequires $ olcRestrict $ olcRootDN $ olcRootPW $ "
"olcSchemaDN $ olcSecurity $ olcSizeLimit $ olcSyncrepl $ "
- "olcTimeLimit $ olcUpdateDN $ olcUpdateRef $ olcMirrorMode ) )",
+ "olcTimeLimit $ olcUpdateDN $ olcUpdateRef $ olcMirrorMode $ "
+ "olcMonitoring ) )",
Cft_Database, NULL, cfAddDatabase },
{ "( OLcfgGlOc:5 "
"NAME 'olcOverlayConfig' "
else
rc = 1;
break;
+ case CFG_MONITORING:
+ c->value_int = (SLAP_DBMONITORING(c->be) != 0);
+ break;
case CFG_SSTR_IF_MAX:
c->value_int = index_substr_if_maxlen;
break;
case CFG_DEPTH:
case CFG_LASTMOD:
case CFG_MIRRORMODE:
+ case CFG_MONITORING:
case CFG_SASLSECP:
case CFG_SSTR_IF_MAX:
case CFG_SSTR_IF_MIN:
SLAP_DBFLAGS(c->be) |= SLAP_DBFLAG_SINGLE_SHADOW;
break;
+ case CFG_MONITORING:
+ if(c->value_int)
+ SLAP_DBFLAGS(c->be) |= SLAP_DBFLAG_MONITORING;
+ else
+ SLAP_DBFLAGS(c->be) &= ~SLAP_DBFLAG_MONITORING;
+ break;
+
case CFG_HIDDEN:
if (c->value_int)
SLAP_DBFLAGS(c->be) |= SLAP_DBFLAG_HIDDEN;
{ BER_BVC("compare"), SLAP_RESTRICT_OP_COMPARE },
{ BER_BVC("read"), SLAP_RESTRICT_OP_READS },
{ BER_BVC("write"), SLAP_RESTRICT_OP_WRITES },
- { BER_BVC("extended"), SLAP_RESTRICT_OP_EXTENDED },
+ { BER_BVC("extended"), SLAP_RESTRICT_OP_EXTENDED },
{ BER_BVC("extended=" LDAP_EXOP_START_TLS ), SLAP_RESTRICT_EXOP_START_TLS },
{ BER_BVC("extended=" LDAP_EXOP_MODIFY_PASSWD ), SLAP_RESTRICT_EXOP_MODIFY_PASSWD },
{ BER_BVC("extended=" LDAP_EXOP_X_WHO_AM_I ), SLAP_RESTRICT_EXOP_WHOAMI },
#define SLAP_DBFLAG_OVERLAY 0x0100U /* this db struct is an overlay */
#define SLAP_DBFLAG_GLOBAL_OVERLAY 0x0200U /* this db struct is a global overlay */
#define SLAP_DBFLAG_DYNAMIC 0x0400U /* this db allows dynamicObjects */
+#define SLAP_DBFLAG_MONITORING 0x0800U /* custom monitoring enabled */
#define SLAP_DBFLAG_SHADOW 0x8000U /* a shadow */
#define SLAP_DBFLAG_SINGLE_SHADOW 0x4000U /* a single-master shadow */
#define SLAP_DBFLAG_SYNC_SHADOW 0x1000U /* a sync shadow */
#define SLAP_DBHIDDEN(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_HIDDEN)
#define SLAP_ISOVERLAY(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_OVERLAY)
#define SLAP_ISGLOBALOVERLAY(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_GLOBAL_OVERLAY)
+#define SLAP_DBMONITORING(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_MONITORING)
#define SLAP_NO_SCHEMA_CHECK(be) \
(SLAP_DBFLAGS(be) & SLAP_DBFLAG_NO_SCHEMA_CHECK)
#define SLAP_GLUE_INSTANCE(be) \