Skip to content

Instantly share code, notes, and snippets.

@betagan
betagan / seeddms_-_add_ldap_search_attribute.diff
Created June 17, 2016 14:12
[SeedDMS] add support to specify custom LDAP searchAttribute
diff --git a/conf/settings.xml.template b/conf/settings.xml.template
index 32afc74..0618b7f 100644
--- a/conf/settings.xml.template
+++ b/conf/settings.xml.template
@@ -147,6 +147,7 @@
- baseDN: top level of the LDAP directory tree
- bindDN: XXX
- bindPw: XXX
+ - searchAttribute: field to search for and compare to username
- filter: Additional filters which are to be checked
@betagan
betagan / gist:df30f9010174333863da
Created July 3, 2015 11:11
output of reproduction script error check_logfiles
$ ./test.sh
>>> cleaning up, removing my.log and my.log.gz, creating empty my.log and initialize run check_logfiles
OK - no errors or warnings|default_lines=1 default_warnings=0 default_criticals=0 default_unknowns=0
>>> append an ERROR line
>>> running check_logfiles for the first time (should and does return CRITICAL)
CRITICAL - (1 errors in check_logfiles.protocol-2015-07-03-13-09-48) - ERROR dummy |default_lines=1 default_warnings=0 default_criticals=1 default_unknowns=0
>>> performing log rotation and put one OK line in the new logfile
>>> running check_logfiles for the second time (should and does return OK)
OK - no errors or warnings|default_lines=1 default_warnings=0 default_criticals=0 default_unknowns=0
>>> append a second OK line to the logfile
@betagan
betagan / reproduce-check_logfiles-bug.sh
Created July 3, 2015 11:07
test script to reproduce check_logfiles bug concerning wrong rotation handling for files with same timestamp
#!/bin/sh
CLCMD="./check_logfiles --logfile=my.log --rotation=my.log.gz --criticalpattern=ERROR"
echo ">>> cleaning up, removing my.log and my.log.gz, creating empty my.log and initialize run check_logfiles"
rm -f my.log.gz my.log
echo "OK some dummy text" > my.log
sleep 1
$CLCMD