From 7c99b9eaadbc286b05d0b301a6a68f9307f2850b Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin <valyala@victoriametrics.com>
Date: Thu, 4 Aug 2022 17:42:43 +0300
Subject: [PATCH 1/2] lib/backup/actions: rename removeLockFile ->
 removeRestoreLock to have consistent naming with createRestoreLock function

---
 lib/backup/actions/restore.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/backup/actions/restore.go b/lib/backup/actions/restore.go
index 127e6c6f41..82c9e7b5dc 100644
--- a/lib/backup/actions/restore.go
+++ b/lib/backup/actions/restore.go
@@ -194,7 +194,7 @@ func (r *Restore) Run() error {
 	logger.Infof("restored %d bytes from backup in %.3f seconds; deleted %d bytes; downloaded %d bytes",
 		backupSize, time.Since(startTime).Seconds(), deleteSize, downloadSize)
 
-	return removeLockFile(r.Dst.Dir)
+	return removeRestoreLock(r.Dst.Dir)
 }
 
 type statWriter struct {
@@ -217,7 +217,7 @@ func createRestoreLock(dstDir string) error {
 	return f.Close()
 }
 
-func removeLockFile(dstDir string) error {
+func removeRestoreLock(dstDir string) error {
 	lockF := path.Join(dstDir, "restore-in-progress")
 	if err := os.Remove(lockF); err != nil {
 		return fmt.Errorf("cannote remove restore lock file %q: %w", lockF, err)

From 752a3008b43a4434a40e9e36a89f0f0435b54c66 Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin <valyala@victoriametrics.com>
Date: Thu, 4 Aug 2022 17:56:07 +0300
Subject: [PATCH 2/2] docs: fix the recommended url for -vmalert.proxyURL
 accroding to 8667307d7349a245608992eea513ee55dbfd45a5

---
 README.md                             | 2 +-
 app/vmalert/README.md                 | 8 ++++++++
 docs/Cluster-VictoriaMetrics.md       | 4 ++--
 docs/README.md                        | 2 +-
 docs/Single-server-VictoriaMetrics.md | 2 +-
 docs/vmalert.md                       | 8 ++++++++
 6 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 811e7fcef1..318f5c65c3 100644
--- a/README.md
+++ b/README.md
@@ -1773,7 +1773,7 @@ when `-vmalert.proxyURL` flag is set. Use this feature for the following cases:
 * for accessing vmalert's UI through single-node VictoriaMetrics Web interface.
 
 For accessing vmalert's UI through single-node VictoriaMetrics configure `-vmalert.proxyURL` flag and visit
-`http://<victoriametrics-addr>:8428/vmalert/home` link.
+`http://<victoriametrics-addr>:8428/vmalert/` link.
 
 ## Benchmarks
 
diff --git a/app/vmalert/README.md b/app/vmalert/README.md
index 5036f27b3b..277f7addce 100644
--- a/app/vmalert/README.md
+++ b/app/vmalert/README.md
@@ -489,6 +489,14 @@ or time series modification via [relabeling](https://docs.victoriametrics.com/vm
 * `http://<vmalert-addr>/metrics` - application metrics.
 * `http://<vmalert-addr>/-/reload` - hot configuration reload.
 
+`vmalert` web UI can be accessed from [single-node version of VictoriaMetrics](https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html)
+and from [cluster version of VictoriaMetrics](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html).
+This may be used for better integraion with Grafana unified alerting system. See the following docs for details:
+
+* [How to query vmalert from single-node VictoriaMetrics](https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#vmalert)
+* [How to query vmalert from VictoriaMetrics cluster](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#vmalert)
+
+
 ## Graphite
 
 vmalert sends requests to `<-datasource.url>/render?format=json` during evaluation of alerting and recording rules
diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md
index 752c3ef544..288db33a11 100644
--- a/docs/Cluster-VictoriaMetrics.md
+++ b/docs/Cluster-VictoriaMetrics.md
@@ -258,7 +258,7 @@ See [trobuleshooting docs](https://docs.victoriametrics.com/Troubleshooting.html
   Note that the `delete_series` handler should be used only in exceptional cases such as deletion of accidentally ingested incorrect time series. It shouldn't
   be used on a regular basis, since it carries non-zero overhead.
 
-- URL for accessing [vmalert's](https://docs.victoriametrics.com/vmalert.html) UI: `http://<vmselect>:8481/select/<accountID>/prometheus/vmalert/home`.
+- URL for accessing [vmalert's](https://docs.victoriametrics.com/vmalert.html) UI: `http://<vmselect>:8481/select/<accountID>/prometheus/vmalert/`.
   This URL works only when `-vmalert.proxyURL` flag is set. See more about vmalert [here](#vmalert). 
 
 - `vmstorage` nodes provide the following HTTP endpoints on `8482` port:
@@ -484,7 +484,7 @@ when `-vmalert.proxyURL` flag is set. Use this feature for the following cases:
 * for accessing vmalert's UI through vmselect's Web interface.
 
 For accessing vmalert's UI through vmselect configure `-vmalert.proxyURL` flag and visit
-`http://<vmselect>:8481/select/<accountID>/prometheus/vmalert/home` link.
+`http://<vmselect>:8481/select/<accountID>/prometheus/vmalert/` link.
 
 
 ## Community and contributions
diff --git a/docs/README.md b/docs/README.md
index 811e7fcef1..318f5c65c3 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1773,7 +1773,7 @@ when `-vmalert.proxyURL` flag is set. Use this feature for the following cases:
 * for accessing vmalert's UI through single-node VictoriaMetrics Web interface.
 
 For accessing vmalert's UI through single-node VictoriaMetrics configure `-vmalert.proxyURL` flag and visit
-`http://<victoriametrics-addr>:8428/vmalert/home` link.
+`http://<victoriametrics-addr>:8428/vmalert/` link.
 
 ## Benchmarks
 
diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md
index 2aef125b60..77ce7c5fc5 100644
--- a/docs/Single-server-VictoriaMetrics.md
+++ b/docs/Single-server-VictoriaMetrics.md
@@ -1777,7 +1777,7 @@ when `-vmalert.proxyURL` flag is set. Use this feature for the following cases:
 * for accessing vmalert's UI through single-node VictoriaMetrics Web interface.
 
 For accessing vmalert's UI through single-node VictoriaMetrics configure `-vmalert.proxyURL` flag and visit
-`http://<victoriametrics-addr>:8428/vmalert/home` link.
+`http://<victoriametrics-addr>:8428/vmalert/` link.
 
 ## Benchmarks
 
diff --git a/docs/vmalert.md b/docs/vmalert.md
index 40c51ab45f..2ec86206e5 100644
--- a/docs/vmalert.md
+++ b/docs/vmalert.md
@@ -493,6 +493,14 @@ or time series modification via [relabeling](https://docs.victoriametrics.com/vm
 * `http://<vmalert-addr>/metrics` - application metrics.
 * `http://<vmalert-addr>/-/reload` - hot configuration reload.
 
+`vmalert` web UI can be accessed from [single-node version of VictoriaMetrics](https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html)
+and from [cluster version of VictoriaMetrics](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html).
+This may be used for better integraion with Grafana unified alerting system. See the following docs for details:
+
+* [How to query vmalert from single-node VictoriaMetrics](https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#vmalert)
+* [How to query vmalert from VictoriaMetrics cluster](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#vmalert)
+
+
 ## Graphite
 
 vmalert sends requests to `<-datasource.url>/render?format=json` during evaluation of alerting and recording rules