- 1 year ago
grafana use ldap on windows grafana server
To configure Grafana to use LDAP authentication on a Windows server, you can follow these general steps:
Install and configure Grafana: Download and install Grafana on your Windows server following the official documentation. Make sure Grafana is up and running.
Configure the LDAP settings: Open the Grafana configuration file (
grafana.ini
) located in the Grafana installation directory (<grafana_installation_directory>\conf\
). Update the following LDAP-related settings:csharp[auth.ldap]
enabled = true
config_file = <path_to_ldap_config_file>
allow_sign_up = false
Set
enabled
totrue
to enable LDAP authentication. Specify the path to your LDAP configuration file using theconfig_file
setting.Create an LDAP configuration file: Create an LDAP configuration file (e.g.,
ldap.toml
) with the necessary LDAP settings. Below is an example configuration:toml[[servers]]
host = "<ldap_server_hostname>"
port = <ldap_server_port>
use_ssl = false
start_tls = false
ssl_skip_verify = false
bind_dn = "<bind_dn>"
bind_password = "<bind_password>"
search_filter = "(sAMAccountName=%s)"
search_base_dns = ["<search_base_dns>"]
Replace the placeholders (
<ldap_server_hostname>
,<ldap_server_port>
,<bind_dn>
,<bind_password>
,<search_base_dns>
) with your actual LDAP server information.Save the LDAP configuration file: Save the LDAP configuration file (
ldap.toml
) in a location accessible by the Grafana server. Note down the path to this file.Restart Grafana: Restart the Grafana server to apply the configuration changes.
Test the LDAP authentication: Access the Grafana web interface and try logging in using an LDAP user account. Grafana should authenticate the user against the LDAP server.
Make sure to adjust the LDAP settings and paths according to your specific LDAP server configuration. Refer to the Grafana documentation for more detailed information and additional LDAP configuration options.