This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |