diff --git a/pages/database-management/configuration.mdx b/pages/database-management/configuration.mdx index d1e4182bf..e24ffb5bc 100644 --- a/pages/database-management/configuration.mdx +++ b/pages/database-management/configuration.mdx @@ -578,7 +578,7 @@ This section contains the list of all other relevant flags used within Memgraph. | `--log-retention-days=35` | Controls for how many days daily log files will be preserved. Allowed values: 1–1000000. | `[uint64]` | | `--memory-limit=0` | Total memory limit in MiB. Set to 0 to use the default values which are 100% of the physical memory if the swap is enabled and 90% of the physical memory otherwise. | `[uint64]` | | `--metrics-address="0.0.0.0"` | Host for HTTP server for exposing metrics. | `[string]` | -| `--metrics-format=JSON` | Format of the metrics HTTP endpoint. Allowed values: `OpenMetrics`, `JSON`. The `JSON` format is deprecated; use `OpenMetrics` for new deployments. See [monitoring](/database-management/monitoring#metrics-tracking-via-http-server-enterprise-edition) for details. | `[string]` | +| `--metrics-format=OpenMetrics` | Format of the metrics HTTP endpoint. Allowed values: `OpenMetrics`, `JSON`. The `JSON` format is deprecated and will be removed in a future release. See [monitoring](/database-management/monitoring#metrics-tracking-via-http-server-enterprise-edition) for details. | `[string]` | | `--metrics-port=9091` | Port for HTTP server for exposing metrics. | `[int32]` | | `--memory-warning-threshold=1024` | Memory warning threshold, in MB. If Memgraph detects there is less available RAM it will log a warning.
Set to 0 to disable. | `[uint64]` | | `--monitoring-address="0.0.0.0"` | IP address where the Memgraph's monitoring WebSocket server should listen. | `[string]` | diff --git a/pages/database-management/monitoring.mdx b/pages/database-management/monitoring.mdx index e967f5d25..077049f9d 100644 --- a/pages/database-management/monitoring.mdx +++ b/pages/database-management/monitoring.mdx @@ -209,16 +209,22 @@ The `--metrics-format` [configuration flag](/database-management/configuration#list-of-configuration-flags) controls the response format of the HTTP endpoint. The allowed values are: -- **`OpenMetrics`**: Prometheus-compatible +- **`OpenMetrics`** (default): Prometheus-compatible [OpenMetrics](https://openmetrics.io/) text format (`application/openmetrics-text`). Metrics are labeled per-database. Any OpenMetrics compatible clients can connect directly to Memgraph to scrape metrics. -- **`JSON`** (default): A flat JSON object. The `JSON` format is deprecated. +- **`JSON`**: A flat JSON object. The `JSON` format is deprecated. Using JSON with any OpenMetrics compatible client requires the [Prometheus exporter](https://github.com/memgraph/prometheus-exporter) middleware. -New deployments should use `OpenMetrics`, which enables direct Prometheus -scraping and provides per-database metric labels. + +In Memgraph 3.13 and later, the default is `OpenMetrics`. In earlier versions the +default was `JSON`. If you upgrade a deployment that relied on the JSON endpoint +without setting the flag, the endpoint now serves OpenMetrics. Either update your +monitoring dashboards, as described in [Migrating from JSON to +OpenMetrics](#migrating-from-json-to-openmetrics), or set `--metrics-format=JSON` +to keep the deprecated format for now. + ### Per-database metrics @@ -566,8 +572,8 @@ scrape_configs: ### JSON monitoring (deprecated) -Set `--metrics-format=JSON` (the current default) to enable the JSON endpoint. -This format is deprecated and will be removed in a future release. +Set `--metrics-format=JSON` to enable the JSON endpoint. This format is +deprecated and will be removed in a future release. To retrieve the metrics, send a GET request to `http://host:port/metrics` or `http://host:port/`: diff --git a/pages/release-notes.mdx b/pages/release-notes.mdx index 4895c8f0f..749aeee0e 100644 --- a/pages/release-notes.mdx +++ b/pages/release-notes.mdx @@ -121,6 +121,14 @@ guide. in `toInteger()` instead of wrapping to a wrong value. Use `toIntegerOrNull()` if you want `null` for those inputs. [#4589](https://github.com/memgraph/memgraph/pull/4589) +- The default value of `--metrics-format` changed from `JSON` to `OpenMetrics`. + A deployment that relied on the JSON metrics endpoint without setting the flag + now serves OpenMetrics after upgrading. Either update your monitoring + dashboards, as described in [Migrating from JSON to + OpenMetrics](/database-management/monitoring#migrating-from-json-to-openmetrics), + or set `--metrics-format=JSON` explicitly. The deprecated JSON endpoint + remains available for several releases. + [#4678](https://github.com/memgraph/memgraph/pull/4678) {

🐞 Bug fixes

}