Module: check_mk
Branch: master
Commit: 93373eddcb943ca6784871cba7c7e14d451c63e2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=93373eddcb943c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Apr 19 10:23:43 2017 +0200
Improved auth debug logging
Change-Id: If0df09eac17c7d56e4b6509eff8db505d6bd1379
---
web/htdocs/login.py | 2 +-
web/htdocs/userdb.py | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/login.py b/web/htdocs/login.py
index af6a88e..2c47fc6 100644
--- a/web/htdocs/login.py
+++ b/web/htdocs/login.py
@@ -273,7 +273,7 @@ def check_auth(mod_python_req):
if user_id and not userdb.is_customer_user_allowed_to_login(user_id):
# A CME not assigned with the current sites customer
# is not allowed to login
- auth_logger.debug("User '%s' is not allowed to login: Invalid customer" % user_id)
+ auth_logger.debug("User '%s' is not allowed to authenticate: Invalid customer" % user_id)
return None
return user_id
diff --git a/web/htdocs/userdb.py b/web/htdocs/userdb.py
index 8e33867..699f977 100644
--- a/web/htdocs/userdb.py
+++ b/web/htdocs/userdb.py
@@ -1215,6 +1215,7 @@ def hook_login(username, password):
if not is_customer_user_allowed_to_login(username):
# A CME not assigned with the current sites customer
# is not allowed to login
+ auth_logger.debug("User '%s' is not allowed to login: Invalid customer" % username)
return False
# Now, after successfull login (and optional user account
@@ -1224,6 +1225,7 @@ def hook_login(username, password):
# a "!". But when using other conectors it might be neccessary
# to validate the user "locked" attribute.
if connection.is_locked(username):
+ auth_logger.debug("User '%s' is not allowed to login: Account locked" % username)
return False # The account is locked
return result
Module: check_mk
Branch: master
Commit: 534ad1299a363d1c81dff35db843af43e21805d9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=534ad1299a363d…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Wed Apr 19 11:36:42 2017 +0200
big upgrade of examples for oracle plugin configuration
Change-Id: I17cc62efaf6079b089b568e6cc86aace0c286ce3
---
agents/cfg_examples/mk_oracle.cfg | 74 +++++++++++++++++++++++++++++++++------
1 file changed, 64 insertions(+), 10 deletions(-)
diff --git a/agents/cfg_examples/mk_oracle.cfg b/agents/cfg_examples/mk_oracle.cfg
index 41a81b3..2be78ae 100644
--- a/agents/cfg_examples/mk_oracle.cfg
+++ b/agents/cfg_examples/mk_oracle.cfg
@@ -1,19 +1,73 @@
-DBUSER=CHECK_MK:<Passwort>
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2014 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# tails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
-export TNS_ADMIN=/u00/app/oracle/network/admin
-### kein ASM bei uns im Einsatz: Skip diese Sections:
+### Configuration examples for the mk_oracle plugin
-SYNC_ASM_SECTIONS=""
-ASYNC_ASM_SECTIONS=""
+### set environment for TNS_ADMIN
+# export TNS_ADMIN=/u00/app/oracle/network/admin
-### Exclude bestimmte Datenbanken bei Bedarf:
+### regular credentials for authentication with several
+### options for configuration verbosity
+# DBUSER='check_mk:myPassword'
+# DBUSER='check_mk:myPassword:SYSDBA:localhost:1521'
+# DBUSER='check_mk:myPassword::localhost:1521'
+# DBUSER='check_mk:myPassword::localhost'
-##EXCLUDE_AIMCOND3="ALL"
+### Credentials for a specific Schema (CMKD)
+# DBUSER_CMKD='check_mk:myPassword:'
-##EXCLUDE_AIMCONM0="ALL"
+### Credentials for ASM
+# ASMUSER='asm_user:asmPassword::localhost'
+# ASMUSER='asm_user:asmPassword:SYSASM:localhost'
-##EXCLUDE_AIMSTGM1="ALL"
+### Only get some SIDs
+# ONLY_SIDS='TES CMKD THIS'
-##EXCLUDE_AIMDWHM1="ALL"
+### Excluding a schema partially or completely
+# EXCLUDE_TES='longactivesessions logswitches'
+# EXCLUDE_THIS='ALL'
+
+### Define sections to catch synchroniously or asynchroniously. The first
+### example is the default if nothing is specified. Omitted sections will not
+### be retrieved. ASM Sections must be specified seperately. The first example
+### is also the default.
+# SYNC_SECTIONS='instance dataguard_stats logswitches longactivesessions performance processes recovery_area recovery_status sessions undostat'
+# SYNC_SECTIONS='instance dataguard_stats processes sessions'
+# ASYNC_SECTIONS='jobs locks resumable rman tablespaces ts_quotas'
+# ASYNC_SECTIONS='tablespaces locks undostat performance'
+# SYNC_ASM_SECTIONS='instance processes'
+# SYNC_ASM_SECTIONS='' # retrieve nothing if ASM is not available
+# ASYNC_ASM_SECTIONS='asm_diskgroup'
+
+### Specifies how long asynchronious retrieved data is valid. The Example
+### is the default.
+# CACHE_MAXAGE=600
+
+### If the database is not located on the host with the plugin running you
+### can still get monitoring information. The data will be piggybacked to a host
+### of your choice in check_mk by added the name at the end of the option:
+# REMOTE_INSTANCE_myRemoteHost='remoteUser:remotePassword::myRemoteHost:1521:CMKD:11.2'
+# REMOTE_ORACLE_HOME='/u01/app/oracle/product/11.2.0/db_1'