diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2015-06-10 18:16:13 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-06-10 18:52:21 +0200 |
commit | f24f936c69ee97cca6095923549430cb6d510320 (patch) | |
tree | c541c7976bfdf43486b3052ed893c84b1ae029b1 /roles/common-LDAP/files/usr | |
parent | b408390ae9311b7d703ce57c25a78dce23c31b16 (diff) |
slapd monitoring.
We don't use the provided 'slapd_' Munin plugin because it doesn't
support SASL binds.
Diffstat (limited to 'roles/common-LDAP/files/usr')
-rwxr-xr-x | roles/common-LDAP/files/usr/local/sbin/slapcat-all.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/roles/common-LDAP/files/usr/local/sbin/slapcat-all.sh b/roles/common-LDAP/files/usr/local/sbin/slapcat-all.sh index 8aa8f78..cd5abd9 100755 --- a/roles/common-LDAP/files/usr/local/sbin/slapcat-all.sh +++ b/roles/common-LDAP/files/usr/local/sbin/slapcat-all.sh @@ -9,11 +9,12 @@ PATH=/usr/sbin:/sbin:/usr/bin:/bin target="$1" umask 0077 -prefix=slapd- +prefix=slapcat- slapcat -n0 -l"$target/${prefix}0.ldif" n=$(grep -Ec '^dn:\s+olcDatabase={[1-9][0-9]*}' "$target/${prefix}0.ldif") while [ $n -gt 0 ]; do - slapcat -n$n -l"$target/${prefix}$n.ldif" + # the Monitor backend can't be slapcat(8)'ed + grep -qE "^dn:\s+olcDatabase=\{$n\}monitor,cn=config$" "$target/${prefix}0.ldif" || slapcat -n$n -l"$target/${prefix}$n.ldif" n=$(( $n - 1 )) done |