LDAP: Add API endpoint to query the LDAP server(s) status (#18868)

* LDAP: Add API endpoint to query the LDAP server(s) status|

This endpoint returns the current status(es) of the configured LDAP server(s).

The status of each server is verified by dialling and if no error is returned we assume the server is operational.

This is the last piece I'll produce as an API before moving into #18759 and see the view come to life.
This commit is contained in:
gotjosh
2019-09-04 15:29:14 +01:00
committed by GitHub
parent a5d8b0212b
commit 7c6dd1868b
7 changed files with 244 additions and 7 deletions
+1
View File
@@ -396,6 +396,7 @@ func (hs *HTTPServer) registerRoutes() {
adminRoute.Post("/provisioning/notifications/reload", Wrap(hs.AdminProvisioningReloadNotifications))
adminRoute.Post("/ldap/reload", Wrap(hs.ReloadLDAPCfg))
adminRoute.Get("/ldap/:username", Wrap(hs.GetUserFromLDAP))
adminRoute.Get("/ldap/status", Wrap(hs.GetLDAPStatus))
}, reqGrafanaAdmin)
// rendering