2021-04-13 03:02:14 +02:00
|
|
|
# Monitoring the platform
|
|
|
|
|
2022-12-26 23:52:03 +01:00
|
|
|
The monitoring design of Kanidm is still very much in its infancy -
|
2023-10-04 09:24:12 +02:00
|
|
|
[take part in the discussion at github.com/kanidm/kanidm/issues/216](https://github.com/kanidm/kanidm/issues/216).
|
2021-04-13 03:02:14 +02:00
|
|
|
|
2023-11-09 06:15:12 +01:00
|
|
|
## kanidmd status endpoint
|
2021-04-13 03:02:14 +02:00
|
|
|
|
2022-12-26 23:52:03 +01:00
|
|
|
kanidmd currently responds to HTTP GET requests at the `/status` endpoint with a JSON object of
|
2022-05-25 23:38:28 +02:00
|
|
|
either "true" or "false". `true` indicates that the platform is responding to requests.
|
2021-04-13 03:02:14 +02:00
|
|
|
|
2022-12-26 23:52:03 +01:00
|
|
|
| URL | `<hostname>/status` |
|
|
|
|
| ------------------ | ------------------------------------------------ |
|
|
|
|
| Example URL | `https://example.com/status` |
|
|
|
|
| Expected response | One of either `true` or `false` (without quotes) |
|
|
|
|
| Additional Headers | x-kanidm-opid |
|
|
|
|
| Content Type | application/json |
|
|
|
|
| Cookies | kanidm-session |
|
2023-11-09 06:15:12 +01:00
|
|
|
|
|
|
|
## OpenTelemetry Tracing
|
|
|
|
|
2024-02-27 14:25:38 +01:00
|
|
|
Configure OTLP trace exports by setting a `otel_grpc_url` in the server configuration. This'll
|
2023-11-09 06:15:12 +01:00
|
|
|
enable [OpenTelemetry traces](https://opentelemetry.io) to be sent for observability use cases.
|
|
|
|
|
2024-02-27 14:25:38 +01:00
|
|
|
Example:
|
2024-03-06 02:33:14 +01:00
|
|
|
|
2024-02-27 14:25:38 +01:00
|
|
|
```toml
|
|
|
|
otel_grpc_url = "http://my-otel-host:4317"
|
|
|
|
```
|
|
|
|
|
2023-11-09 06:15:12 +01:00
|
|
|
### Troubleshooting
|
|
|
|
|
|
|
|
#### Max Span Size Exceeded
|
|
|
|
|
|
|
|
On startup, we run some big processes that might hit a "max trace size" in certain configurations.
|
|
|
|
Grafana Tempo defaults to 5MB, which is sensible for most things, but ... 😁
|
|
|
|
|
|
|
|
Grafana Tempo
|
|
|
|
[config to allow larger spans](https://grafana.com/docs/tempo/latest/troubleshooting/response-too-large/):
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
distributor:
|
2024-02-27 14:25:38 +01:00
|
|
|
receivers:
|
2023-11-09 06:15:12 +01:00
|
|
|
otlp:
|
|
|
|
protocols:
|
|
|
|
grpc:
|
|
|
|
max_recv_msg_size_mib: 20
|
|
|
|
```
|