* Server: Support simultaneous TCP and Unix domain socket serving
This commit introduces the 'serve_on_socket' configuration option,
allowing Grafana to listen on both a TCP port and a Unix domain socket
simultaneously.
Rationale:
- Performance: Provides a high-performance, low-latency connection path
for local reverse proxies or load balancers using Unix domain sockets.
- Observability: Maintains direct TCP access, enabling sidecars or
external services (like Prometheus) to scrape metrics or perform
health checks without requiring UDS support.
Key changes:
- pkg/setting: Added ServeOnSocket to Cfg and updated parsing logic to
always load socket-related settings regardless of the primary protocol.
- pkg/api: Refactored HTTPServer to support multiple concurrent
listeners using errgroup. Added getListeners to return both the
primary TCP/UDS listener and the optional additional UDS listener.
- conf: Added serve_on_socket to defaults.ini.
- docs: Updated configuration documentation for the new setting.
* Tests: Add TestHTTPServer_getListeners to verify multiple listeners
* Server: address review feedback for simultaneous TCP and UDS serving
* Fix linter findings
* server: reload of grafana server certs when renewed without restart.
Signed-off-by: Rao, B V Chalapathi <b_v_chalapathi.rao@nokia.com>
* server: reload of grafana server certs when renewed without restart.
Signed-off-by: Rao, B V Chalapathi <b_v_chalapathi.rao@nokia.com>
* Update http_server.go
* Update docs/sources/setup-grafana/configure-grafana/_index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update http_server.go
Address the comments
* Update docs/sources/setup-grafana/configure-grafana/_index.md
Co-authored-by: Dan Cech <dan@aussiedan.com>
* Update http_server.go
Align the spaces
* Update http_server.go
* Update http_server.go
* Update pkg/api/http_server.go
Co-authored-by: Dan Cech <dan@aussiedan.com>
---------
Signed-off-by: Rao, B V Chalapathi <b_v_chalapathi.rao@nokia.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Dan Cech <dan@aussiedan.com>