From 22c47e97a51a34d90a3aeb980c6b9c277d13594b Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 17 Aug 2022 21:24:00 +0300 Subject: [PATCH] docs: follow-up after 68e56b6fc5855ef7d1b161841c0888d07c3a4cab --- app/vmalert/README.md | 3 ++- docs/CHANGELOG.md | 4 ++-- docs/vmalert.md | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/vmalert/README.md b/app/vmalert/README.md index 5ee23d1668..243257e8c2 100644 --- a/app/vmalert/README.md +++ b/app/vmalert/README.md @@ -500,8 +500,9 @@ or time series modification via [relabeling](https://docs.victoriametrics.com/vm * `http://` - UI; * `http:///api/v1/rules` - list of all loaded groups and rules; * `http:///api/v1/alerts` - list of all active alerts; -* `http:///vmalert/api/v1/alert?group_id=&alert_id="` - get alert status by ID. +* `http:///vmalert/api/v1/alert?group_id=&alert_id=` - get alert status in JSON format. Used as alert source in AlertManager. +* `http:///vmalert/alert?group_id=&alert_id=` - get alert status in web UI. * `http:///metrics` - application metrics. * `http:///-/reload` - hot configuration reload. diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 9f6b3216b1..66cce38c42 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -16,7 +16,7 @@ The following tip changes can be tested by building VictoriaMetrics components f ## tip **Update note 1:** [vmalert](https://docs.victoriametrics.com/vmalert.html) by default hides values of `-remoteWrite.url`, `-remoteRead.url` and `-datasource.url` in logs and at `http://vmalert:8880/flags` for security reasons. See the corresponding SECURITY change in the Chagelog below for additional info. -**Update note 2:** [vmalert](https://docs.victoriametrics.com/vmalert.html) by default alert's source now contains a link to vmalert's UI instead of JSON representation. To switch to the old behavior set `-external.alert.source=vmalert/api/v1/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}`. +**Update note 2:** [vmalert](https://docs.victoriametrics.com/vmalert.html) by default points alert source url to `/vmalert/alert?...` aka [web UI](https://docs.victoriametrics.com/vmalert.html#web) instead of `/vmalert/api/v1/alert?...` aka JSON handler. The old behavior can be returned back by seting `-external.alert.source=vmalert/api/v1/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}` command-line flag. * SECURITY: [vmalert](https://docs.victoriametrics.com/vmalert.html): do not expose `-remoteWrite.url`, `-remoteRead.url` and `-datasource.url` command-line flag values in logs and at `http://vmalert:8880/flags` page by default, since they may contain sensitive data such as auth keys. This aligns `vmalert` behaviour with [vmagent](https://docs.victoriametrics.com/vmagent.html), which doesn't expose `-remoteWrite.url` command-line flag value in logs and at `http://vmagent:8429/flags` page by default. Specify `-remoteWrite.showURL`, `-remoteRead.showURL` and `-datasource.showURL` command-line flags for showing values for the corresponding `-*.url` flags in logs. Thanks to @mble for [the pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2965). @@ -30,7 +30,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add a legend in the top right corner for shortcut keys. See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2813). * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): add `toTime()` template function in the same way as Prometheus 2.38 [does](https://github.com/prometheus/prometheus/pull/10993). See [these docs](https://prometheus.io/docs/prometheus/latest/configuration/template_reference/#numbers). * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): add `$alertID` and `$groupID` template variables. These variables may be used for templating annotations or `-external.alert.source` command-line flag. See the full list of supported variables [here](https://docs.victoriametrics.com/vmalert.html#templating). -* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): use link to vmalert's UI as alert's source instead of link to JSON representation. To switch to the old behavior set `-external.alert.source=vmalert/api/v1/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}`. +* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): point alert source to [vmalert's UI](https://docs.victoriametrics.com/vmalert.html#web) at `/vmalert/alert?...` instead of JSON handler at `/vmalert/api/v1/alert?...`. This improves user experience. The old behavior can be returned back by setting `-external.alert.source=vmalert/api/v1/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}` command-line flag. * BUGFIX: prevent from excess CPU usage when the storage enters [read-only mode](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#readonly-mode). * BUGFIX: improve performance for requests to [/api/v1/labels](https://docs.victoriametrics.com/url-examples.html#apiv1labels) and [/api/v1/label/.../values](https://docs.victoriametrics.com/url-examples.html#apiv1labelvalues) when the filter in the `match[]` query arg matches small number of time series. The performance for this case has been reduced in [v1.78.0](https://docs.victoriametrics.com/CHANGELOG.html#v1780). See [this](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2978) and [this](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1533) issues. diff --git a/docs/vmalert.md b/docs/vmalert.md index 124d7fa4e2..d0f4a782bd 100644 --- a/docs/vmalert.md +++ b/docs/vmalert.md @@ -504,8 +504,9 @@ or time series modification via [relabeling](https://docs.victoriametrics.com/vm * `http://` - UI; * `http:///api/v1/rules` - list of all loaded groups and rules; * `http:///api/v1/alerts` - list of all active alerts; -* `http:///vmalert/api/v1/alert?group_id=&alert_id="` - get alert status by ID. +* `http:///vmalert/api/v1/alert?group_id=&alert_id=` - get alert status in JSON format. Used as alert source in AlertManager. +* `http:///vmalert/alert?group_id=&alert_id=` - get alert status in web UI. * `http:///metrics` - application metrics. * `http:///-/reload` - hot configuration reload.