Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions content/configuration/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ description: Configuration for metrics.

To enable performance and error measurement of connected services, Directus can provide Prometheus metrics.

| Variable | Description | Default Value |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| `METRICS_ENABLED` | Whether or not to enable metrics. | `false` |
| `METRICS_SCHEDULE` | The cron schedule at which to generate the metrics, the default is every minute | `*/1 * * * *` |
| `METRICS_TOKENS` | A CSV of tokens to allow access to via a `Authorization: Metrics <token>` header. By default it is restricted to admins | -- |
| `METRICS_SERVICES` | A CSV of directus services to observe metrics for. Currently `database`, `cache`, `redis` and `storage` are supported | `database,cache,redis,storage` |
| Variable | Description | Default Value |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| `METRICS_ENABLED` | Whether or not to enable metrics. | `false` |
| `METRICS_SCHEDULE` | The cron schedule at which to generate the metrics, the default is every minute | `*/1 * * * *` |
| `METRICS_TOKENS` | A CSV of tokens to allow access to via a `Authorization: Metrics <token>` header. By default it is restricted to admins | -- |
| `METRICS_SERVICES` | A CSV of directus services to observe metrics for. Currently `database`, `cache`, `redis` and `storage` are supported | `database,cache,redis,storage` |
| `METRICS_NAME_PREFIX` | Prefix applied to all Prometheus metric names. | `directus_` |
| `METRICS_HEALTH_CHECK_PREFIX` | Prefix for health check keys used in cache, Redis, and storage checks. | `directus-metric-` |

::callout{icon="material-symbols:warning-rounded" color="warning"}
**Metric Aggregation**
Expand Down
11 changes: 11 additions & 0 deletions content/configuration/synchronization.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,14 @@ Redis is a critical component for Directus in multi-container deployments. It en
| `REDIS_PORT` | Port of the Redis instance. | |
| `REDIS_USERNAME` | Username for the Redis instance. | |
| `REDIS_PASSWORD` | Password for the Redis instance. | |

### Redis Namespaces

When running multiple Directus instances against a single Redis server, configure unique namespace values per instance to avoid key collisions.

| Variable | Description | Default Value |
| ----------------------------- | -------------------------------------- | ------------------- |
| `REDIS_BUS_NAMESPACE` | Namespace for the pub/sub message bus. | `directus:bus` |
| `REDIS_LOCK_NAMESPACE` | Namespace for distributed locks. | `directus:lock` |
| `REDIS_COUNTERS_NAMESPACE` | Namespace for telemetry counters. | `directus:counters` |
| `REDIS_PERMISSIONS_NAMESPACE` | Namespace for the permissions cache. | `permissions` |