Skip to content
Merged
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
2 changes: 1 addition & 1 deletion pages/database-management/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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. <br/>Set to 0 to disable. | `[uint64]` |
| `--monitoring-address="0.0.0.0"` | IP address where the Memgraph's monitoring WebSocket server should listen. | `[string]` |
Expand Down
18 changes: 12 additions & 6 deletions pages/database-management/monitoring.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
<Callout type="warning">
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.
</Callout>

### Per-database metrics

Expand Down Expand Up @@ -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/`:
Expand Down
8 changes: 8 additions & 0 deletions pages/release-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

{<h4 className="custom-header">🐞 Bug fixes</h4>}

Expand Down