LDAP logging and configuration

I’m using Grafana version 4.2.0-1. I’ve configured the LDAP via the: /etc/grafana/ldap.toml config file. Here’s my configuration:

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 = "mysuperuser@mydomain.com"
# 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 is enabled in the grafana config file:

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

Debug logger is also enabled:

[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

The problem is, that I’m unable to login with a user from my Active Directory or create a new user (via the signup)

The grafana logger (/var/logs/grafana) doesn’t show a lot of info regarding the 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

Any idea how to turn on the debug logger for LDAP so it’ll more info. Am i missing something in the configration?

The server logs looks like you shut down the server right after it started, or did you do a quick login attempt before you stopped grafana-server?

It seems to be working now.
I’ve modified the wrong grafana config file (i’ve modified the default one instead of the one located in /etc/grafana)