2017-04-05 3 views
0

Grafana 버전 4.2.0-1을 사용하고 있습니다. /etc/grafana/ldap.toml 구성 파일을 통해 LDAP를 구성했습니다.Grafana LDAP 로깅

verbose_logging = true 

[[servers]] 
# Ldap server host (specify multiple hosts space separated) 
host = "myhost.mydomain.com" 
# Default port is 389 or 636 if use_ssl = true 
port = 636 
# Set to true if ldap server supports TLS 
use_ssl = true 
# Set to true if connect ldap server with STARTTLS pattern (create connection in insecure, then upgrade to secure connection with TLS) 
start_tls = true 
# set to true if you want to skip ssl cert validation 
ssl_skip_verify = true 
# set to the path to your root CA certificate or leave unset to use system defaults 
# root_ca_cert = /path/to/certificate.crt 

# Search user bind dn 
bind_dn = "[email protected]" 
# Search user bind password 
# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;""" 
bind_password = 'mypass' 

# User search filter, for example "(cn=%s)" or "(sAMAccountName=%s)" or "(uid=%s)" 
#search_filter = "(uid=%s)" 
search_filter = "(sAMAccountName=%s)" 

# An array of base dns to search through 
search_base_dns = ["CN=Users,DC=corp,DC=mydomain,DC=com"] 

# Specify names of the ldap attributes your ldap uses 
[servers.attributes] 
name = "givenName" 
surname = "sn" 
username = "sAMAccountName" 
member_of = "memberOf" 
email = "mail" 

# Map ldap groups to grafana org roles 
[[servers.group_mappings]] 

#group_dn = "cn=admins,dc=grafana,dc=org" 
group_dn = "CN=Admins,CN=Users,DC=corp,DC=mycompany,DC=com" 
org_role = "Admin" 
# The Grafana organization database id, optional, if left out the default org (id 1) will be used 
# org_id = 1 

#[[servers.group_mappings]] 
#group_dn = "cn=users,dc=grafana,dc=org" 
#org_role = "Editor" 

[[servers.group_mappings]] 
# If you want to match all (or no ldap groups) then you can use wildcard 
group_dn = "*" 
org_role = "Viewer" 

LDAP가 grafana 설정 파일에서 사용 가능 :

[auth.ldap] 
enabled = true 
config_file = /etc/grafana/ldap.toml 
allow_sign_up = true 

디버그 로거도 사용할 수 있습니다 : 여기 내 구성입니다

[log] 
# Either "console", "file", "syslog". Default is console and file 
# Use space to separate multiple modes, e.g. "console file" 
mode = console file syslog 

# Either "debug", "info", "warn", "error", "critical", default is "info" 
level = debug 

# optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug 
filters = "ldap:debug" 

# For "console" mode only 
[log.console] 
level = debug 

# log line format, valid options are text, console and json 
format = console 

# For "file" mode only 
[log.file] 
level = debug 

문제는 내가 드릴 수 없습니다 있다는 것입니다 내 Active Directory에서 사용자와 로그인하거나 가입을 통해 새 사용자를 만들려면

grafana 로거 (은/var/로그/grafana)가 LDAP에 대한 많은 정보를 표시하지 않습니다 :

t=2017-04-05T13:33:52+0000 lvl=info msg="Ldap enabled, reading config file" logger=ldap file=/etc/grafana/ldap.toml 
t=2017-04-05T13:33:52+0000 lvl=info msg="Starting plugin search" logger=plugins 
t=2017-04-05T13:33:52+0000 lvl=dbug msg="Checking for updates" 
t=2017-04-05T13:33:52+0000 lvl=info msg="Initializing CleanUpService" logger=cleanup 
t=2017-04-05T13:33:52+0000 lvl=info msg="Initializing Alerting" logger=alerting.engine 
t=2017-04-05T13:33:52+0000 lvl=info msg="Initializing Stream Manager" 
t=2017-04-05T13:33:52+0000 lvl=info msg="Initializing HTTP Server" logger=http.server address=0.0.0.0:3000 protocol=http subUrl= 
t=2017-04-05T13:33:53+0000 lvl=dbug msg="Scheduling update" logger=alerting.scheduler ruleCount=0 
t=2017-04-05T13:33:57+0000 lvl=dbug msg="Looking for App Dashboard Updates" logger=plugins 
t=2017-04-05T13:34:03+0000 lvl=dbug msg="Scheduling update" logger=alerting.scheduler ruleCount=0 
t=2017-04-05T13:34:13+0000 lvl=dbug msg="Scheduling update" logger=alerting.scheduler ruleCount=0 
t=2017-04-05T13:34:21+0000 lvl=info msg="Shutdown started" logger=server code=0 reason="system signal: terminated" 
t=2017-04-05T13:34:21+0000 lvl=info msg="stopped http server" logger=http.server 

LDAP 그래서거야 대한 추가 정보를 원하시면 디버그 로거 설정하는 방법에 어떤 생각. 구성에 뭔가가 누락 되었습니까?

답변

0

ldap.toml의 verbose_logging = true으로 충분해야합니다. enter code heret=2017-12-01T13:06:30+0100 lvl=dbug msg="Ldap User found" logger=ldap info="(*login.LdapUserInfo)(0xc4200fddc0)({\n DN: (string) (len=86) \"...

같은 하지 않도록

내가 실제로 로그인을 시도 LDAP 로깅을 얻을.

filters = "ldap:debug"에 대한 얻을 메시지