From 7d1d82d094ab7fd44d261b969448f22554f63727 Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin <valyala@victoriametrics.com>
Date: Wed, 14 Dec 2022 09:31:28 -0800
Subject: [PATCH] docs/Cluster-VictoriaMetrics.md: mention the
 `vm_storage_is_read_only` metric, which can help debugging readonly mode at
 vmstorage

---
 README.md                       | 8 +++++++-
 docs/Cluster-VictoriaMetrics.md | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 4e5519667f..a7ca0044d9 100644
--- a/README.md
+++ b/README.md
@@ -283,7 +283,13 @@ See [troubleshooting docs](https://docs.victoriametrics.com/Troubleshooting.html
 
 ## Readonly mode
 
-`vmstorage` nodes automatically switch to readonly mode when the directory pointed by `-storageDataPath` contains less than `-storage.minFreeDiskSpaceBytes` of free space. `vminsert` nodes stop sending data to such nodes and start re-routing the data to the remaining `vmstorage` nodes.
+`vmstorage` nodes automatically switch to readonly mode when the directory pointed by `-storageDataPath`
+contains less than `-storage.minFreeDiskSpaceBytes` of free space. `vminsert` nodes stop sending data to such nodes
+and start re-routing the data to the remaining `vmstorage` nodes.
+
+`vmstorage` sets `vm_storage_is_read_only` metric at `http://vmstorage:8482/metrics` to `1` when it enters read-only mode.
+The metric is set to `0` when the `vmstorage` isn't in read-only mode.
+
 
 ## URL format
 
diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md
index 0f9bb11d25..a69e0aab4a 100644
--- a/docs/Cluster-VictoriaMetrics.md
+++ b/docs/Cluster-VictoriaMetrics.md
@@ -287,7 +287,13 @@ See [troubleshooting docs](https://docs.victoriametrics.com/Troubleshooting.html
 
 ## Readonly mode
 
-`vmstorage` nodes automatically switch to readonly mode when the directory pointed by `-storageDataPath` contains less than `-storage.minFreeDiskSpaceBytes` of free space. `vminsert` nodes stop sending data to such nodes and start re-routing the data to the remaining `vmstorage` nodes.
+`vmstorage` nodes automatically switch to readonly mode when the directory pointed by `-storageDataPath`
+contains less than `-storage.minFreeDiskSpaceBytes` of free space. `vminsert` nodes stop sending data to such nodes
+and start re-routing the data to the remaining `vmstorage` nodes.
+
+`vmstorage` sets `vm_storage_is_read_only` metric at `http://vmstorage:8482/metrics` to `1` when it enters read-only mode.
+The metric is set to `0` when the `vmstorage` isn't in read-only mode.
+
 
 ## URL format