Hi,
is there a more efficient way to count how many entries a ldap database has than
slapcat -b <suffix> | grep ^dn: | wc -l
I searched the cn=Monitor backend but it does not seem to export this number.
I want to have this for graphing and reporting and as a secondary data point that replication is working as intended.
BR Karsten
Karsten Heymann karsten.heymann@gmail.com schrieb am 14.11.2017 um 11:47 in
Nachricht CAL017hDRC7jxs2-xYk2g8qLguJw+gjTdUXvwk-UkyPXAKvgcAg@mail.gmail.com:
Hi,
is there a more efficient way to count how many entries a ldap database has than
slapcat -b <suffix> | grep ^dn: | wc -l
Here olmBDBDNCache from cn=Database 1,cn=Databases,cn=Monitor seems to be close to the number (10762 vs. 10770).
I searched the cn=Monitor backend but it does not seem to export this number.
I want to have this for graphing and reporting and as a secondary data point that replication is working as intended.
BR Karsten
Hi Ulrich,
2017-11-14 12:40 GMT+01:00 Ulrich Windl Ulrich.Windl@rz.uni-regensburg.de:
Karsten Heymann karsten.heymann@gmail.com schrieb:
is there a more efficient way to count how many entries a ldap database
has
than
slapcat -b <suffix> | grep ^dn: | wc -l
Here olmBDBDNCache from cn=Database 1,cn=Databases,cn=Monitor seems to be close to the number (10762 vs. 10770).
I guess you are using the bdb/hdb engine? I'm using mdb and I don't have that attribute.
+Karsten
Karsten Heymann karsten.heymann@gmail.com schrieb am 14.11.2017 um 15:26 in
Nachricht CAL017hBrprNwGEQq88Zty7EF9O3uD8u43UMkTZOn-LgFTzvFQw@mail.gmail.com:
Hi Ulrich,
2017-11-14 12:40 GMT+01:00 Ulrich Windl Ulrich.Windl@rz.uni-regensburg.de:
Karsten Heymann karsten.heymann@gmail.com schrieb:
is there a more efficient way to count how many entries a ldap database
has
than
slapcat -b <suffix> | grep ^dn: | wc -l
Here olmBDBDNCache from cn=Database 1,cn=Databases,cn=Monitor seems to be close to the number (10762 vs. 10770).
I guess you are using the bdb/hdb engine? I'm using mdb and I don't have that attribute.
+Karsten
Hi Karsten
I avoided mdb so far, but maybe there's an equivalent of SQL's "select count(...) ..." for MDB that can be added to the monitor more or less easily ;-)
Regards, Ulrich
Hi,
2017-11-14 15:37 GMT+01:00 Ulrich Windl Ulrich.Windl@rz.uni-regensburg.de:
I avoided mdb so far
I can only recommend it. Its handling is so much simpler.
BR Karsten
Karsten Heymann wrote:
is there a more efficient way to count how many entries a ldap database has than
You could try using contrib overlay slapo-noopsrch and then use noop search request control. But if you have many entries you will run into search timeout.
ldapsearch -E 1.3.6.1.4.1.4203.666.5.18
outputs base64 of BER encoding of response control value which is described herein:
https://www.openldap.org/its/index.cgi?findid=6598
See also file Demo/pyasn1/noopsearch.py in python-ldap's source tar.gz.
Also my monitoring script does that: https://www.stroeder.com/pylib/slapd_checkmk.py
How many entries do you have in your DB?
Ciao, Michael.
Hi Michael,
2017-11-14 16:21 GMT+01:00 Michael Ströder michael@stroeder.com:
Also my monitoring script does that: https://www.stroeder.com/pylib/slapd_checkmk.py
Interesting, I will have a look, especially as we might use checkmk as well.
How many entries do you have in your DB?
Currently about 1.5Mio.
BR Karsten
openldap-technical@openldap.org