Commit graph

93 commits

Author SHA1 Message Date
Aliaksandr Valialkin
7ae038766c
app/vmalert/templates: properly escape all the special chars in quotesEscape function
Previously the `quotesEscape` function was escaping only double quotes.
This wasn't enough, since the input string could contain other special chars,
which must be escaped when put inside JSON string. For example, carriage return and line feed chars (\n\r),
backslash char, etc. This led to the following issues, which were improperly fixed:

- https://github.com/VictoriaMetrics/VictoriaMetrics/issues/890 - this issue
  was "fixed" by introducing the `crlfEscape` function, which led to unnecessary
  complications in user templates, while not fixing various corner cases
  such as backslash chars in the input string.
  See 1de15ad490

- https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3139 - this issue
  was "fixed" by urlencoding the whole string passed to -external.alert.source
  command-line flag. This led to invalid urls, which couldn't be parsed by Grafana.
  See 00c838353d
  and 4bd0244599

This commit properly encodes the input string passed to `quotesEscape`, so it can be safely embedded inside JSON strings.

This commit deprecates crlfEscape template function and adds the following new template functions:

- strvalue and stripDomain - these functions are supported by Prometheus, so they were added
  for compatibility purposes.
- jsonEscape and htmlEscape for converting the input string to valid quoted JSON string
  and for html-escaping the input string, so it could be safely embedded as a plaintext
  into html.

This commit also documents all supported template functions at https://docs.victoriametrics.com/vmalert.html#template-functions
The deprecated crlfEscape function isn't documented on purpose, since its usefulness is negative in general case.
2022-10-28 00:08:50 +03:00
Denys Holius
99777b3d2a
deployment/docker: add version tag for docker containers (#3141)
* deployment/docker/docker-compose.yml: adds version tags for VictoriaMetrics containers

* deployment/docker/docker-compose-cluster.yml: adds version tags for VictoriaMetrics containers
2022-09-22 19:18:50 +03:00
Roman Khavronenko
f772ee8326
deployment/docker: move cluster compose env to master branch (#3130)
* deployment/docker: move cluster compose env to master branch

The change supposed to simplify the process of maintaining for
single/cluster docker-compose envs, alerts, dashboards. It also
supposes to reduce confusion for users when looking for cluster
related alerts/configs.

Signed-off-by: hagen1778 <roman@victoriametrics.com>

* deployment/docker: move cluster compose env to master branch

Review updates.

Signed-off-by: hagen1778 <roman@victoriametrics.com>

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-09-21 12:03:10 +03:00
Denys Holius
a186f21f4c
deployment/docker/docker-compose: expose port for vminsert (#3096)
deployment/docker: open port for vminsert because it can't be reached from nginx/curl/etc as it run at random port in OS
2022-09-14 07:13:56 +02:00
Max Golionko
e07f23a1b9
moved cluster dashboard to master (#3074)
dashboards: move cluster dashboard to master branch

This change should simplify dashboards management.
2022-09-08 11:47:25 +03:00
Denys Holius
fb80735a9a
deployment: bump Grafana version to latest 9.1.0 (#2995)
see more at https://grafana.com/blog/2022/08/16/grafana-9.1-release/
2022-08-18 12:20:56 +02:00
Aliaksandr Valialkin
690b505975
deployment/docker: specify docker image tags for all the docker images for reproducible docker-compose up runs 2022-08-09 12:30:22 +03:00
Aliaksandr Valialkin
8b5b64856b
deployment/docker: update Grafana from v9.0.2 to v9.0.3
See https://grafana.com/blog/2022/07/14/grafana-v9-0-3-8-5-9-8-4-10-and-8-3-10-released-with-high-severity-security-fix/
2022-07-18 14:27:42 +03:00
Denys Holius
083af28cf8
deployment/docker/docker-compose.yml: update Grafana from v8.5.1 to v9.0.2 (#2859)
See https://grafana.com/blog/2022/06/14/grafana-9.0-release-oss-and-cloud-features
2022-07-12 20:03:28 +03:00
Dmytro Kozlov
028c28b84a
deployment/docker: added vmalert.proxyURL flag (#2549) 2022-05-06 17:34:09 +03:00
Aliaksandr Valialkin
5f41c48e4f
deployment/docker/docker-compose.yml: update Grafana version from v8.3.5 to v8.5.1 2022-04-29 12:02:32 +03:00
Aliaksandr Valialkin
fc57035343
deployment/docker/docker-compose.yml: update Grafana from v8.3.4 to v8.3.5
See https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes
2022-02-14 13:22:06 +02:00
Aliaksandr Valialkin
8dde20091f
deployment/docker: update Grafana from v8.3.2 to v8.3.4 2022-01-18 22:42:32 +02:00
Aliaksandr Valialkin
b73dc2b3df
deployment/docker/docker-compose.yml: update Grafana version from 8.2.2 to 8.3.2
See https://grafana.com/blog/2021/12/10/grafana-8.3.2-and-7.5.12-released-with-moderate-severity-security-fix/
2021-12-14 15:09:37 +02:00
Aliaksandr Valialkin
e18aa6e07e
deployment/docker: update Grafana from v8.2.0 to v8.2.2 2021-10-22 19:30:06 +03:00
Yurii Kravets
f7cb850f8d
Updated docker-compose.yml (#1730)
* Updated docker-compose.yml

Added one more Vmstorage to compose and pointed vmselect and vminsert to it.

* Update prometheus.yml

According to requested changes for new vmstorage

* Update docker-compose

Added port mapping

* Updated docker-compose

Set same ports for both storages

* Update prometheus.yml

Changed target for vmstorage1

* Updated docker compose

Changed the flags for vmstorage1

* Update docker compose

Changed flags for vmisert and vmselect to point to vmstorage1

* Update docker compose

Made the vmstorage names uniform

* Update prometheus.ymk

* Update docker-compose.yml

Removed additional flags as they are using default values.

* Update prometheus.yml

Put vmstorage targets under the same job

* Update prometheus.yml

Changed targets format

* Update docker-compose.yml

Set two different volumes for every vmstorage node

* Update deployment/docker/prometheus.yml

* Apply suggestions from code review

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2021-10-22 19:26:02 +03:00
Aliaksandr Valialkin
ab3dcf3f77
deployment/docker/docker-compose.yml: upgrade Grafana from v8.1.2 to v8.2.0 2021-10-08 20:37:32 +03:00
Roman Khavronenko
af8c1feddb Single dashboards upd (#1593)
* dasbhoard: replace `null` datasources

null datasource value may confuse Grafana and make it drop panel query in some
versions.

* docker: bump grafana image version

* dashboards: add URL variable selector to vmagent dashboard

* dashboards: add new panel `Remote write connection saturation` to vmagent dashboard

* alerts: add new alert for `Remote write connection saturation` panel of vmagent dashboard

* dashboards: add "Logging rate" panel to vmagent dashboard
2021-09-01 12:24:55 +03:00
Roman Khavronenko
434f33d04d
Cluster sync master changes (#1592)
* docker: add README for docker compose env

* docker: add vmalert Grafana dashboard
2021-09-01 10:25:07 +03:00
Aliaksandr Valialkin
8890dadd73 deployment/docker/docker-compose.yml: update Grafana from v7.5.2 to v8.0.0
See https://github.com/grafana/grafana/releases/tag/v8.0.0
2021-06-08 15:53:24 +03:00
Aliaksandr Valialkin
16e8e09d61 deployment/docker/docker-compose.yml: update Grafana from v7.5.1 to v7.5.2 2021-04-05 22:30:51 +03:00
Roman Khavronenko
51faea5e4b
deployment: add vmalert+alertmanager services and list of default alerts for cluster version (#1187) 2021-04-05 22:29:04 +03:00
Denys Holius
7e6f168fc3 deployment: Grafana version updated to 7.5.1 (#1161) 2021-03-30 20:44:40 +03:00
Aliaksandr Valialkin
cc735da814 deployment/docker/docker-compose.yml: update Grafana version from 7.0.3 to 7.1.1 2020-07-24 18:41:49 +03:00
Roman Khavronenko
21cf6a1ec4
deployment/docker: replace Prometheus with vmagent (#635)
* replace Prometheus with vmagent in docker compose env;
* cluster dashboard: exclude vmagent from job list;
* cluster dasbhoard: reference datasource var instead of datasource name.
2020-07-17 02:18:03 +03:00
Aliaksandr Valialkin
d664bde307 deployment/docker/docker-compose.yml: update Prometheus from v1.18.1 to v1.19.1 and Grafana from v7.0.2 to v7.0.3 2020-06-24 18:09:53 +03:00
Denis
21df9025c9 Update docker-compose.yml (#530)
Update to latest version of Prometheus & Grafana.
2020-06-03 23:38:11 +03:00
Aliaksandr Valialkin
82b2524f28 deployment/docker/docker-compose.yml: bump Prometheus from v2.17.1 to v2.17.2 and Grafana from v6.7.1 to v6.7.2 2020-04-20 17:30:22 +03:00
Roman Khavronenko
a2767fe86f bump Prometheus and Grafana images (#389) 2020-03-28 01:19:19 +02:00
Aliaksandr Valialkin
8a4d4978a3 deployment/docker: update Prometheus from v2.14.0 to v2.15.2 and Grafana from v6.5.0 to v6.5.2 2020-01-12 23:14:56 +02:00
Aliaksandr Valialkin
c0060c5858 deployment/docker: remove Docker image tag in docker-compose images
This should allow loading latest images by default
2019-12-24 13:27:42 +02:00
Aliaksandr Valialkin
ba17fcbcc5 deployment/docker: update docker image tags from v1.31.1-cluster to v1.31.2-cluster 2019-12-20 13:06:49 +02:00
Aliaksandr Valialkin
198debc1c6 deployment/docker: update docker image tags from v1.30.6-cluster to v1.31.1-cluster 2019-12-16 01:49:00 +02:00
Aliaksandr Valialkin
c444a929a6 deployment/docker: update Docker image tags from v1.30.5-cluster to v1.30.6-cluster 2019-12-10 00:13:59 +02:00
Aliaksandr Valialkin
7a775714ab deployment/docker: update Docker image tags from v1.30.4-cluster to v1.30.5-cluster 2019-12-05 20:15:50 +02:00
Aliaksandr Valialkin
877b83ce97 deployment/docker: update docker image tags from v1.30.3-cluster to v1.30.4-cluster 2019-12-04 01:53:04 +02:00
Aliaksandr Valialkin
47077c02ba deployment/docker: update image tags from v1.30.2-cluster to v1.30.3-cluster 2019-12-02 22:51:31 +02:00
Aliaksandr Valialkin
387f62f468 deployment/docker: update docker image tag from v1.30.1-cluster to v1.30.2-cluster 2019-12-02 15:17:41 +02:00
Aliaksandr Valialkin
274d8bcb7b deployment/docker/docker-compose.yml: remove superflouos volume mount (#246)
The `provisioning/dashboards` folder should be already mounted on the previous line.

This should fix the `/bin/sh: can't create dashboards/vm.json: Permission denied` error on `docker-compose up`
2019-11-29 18:10:50 +02:00
Aliaksandr Valialkin
93dbec971b deployment/docker: update docker image tags from v1.30.0-cluster to v1.30.1-cluster 2019-11-28 22:26:25 +02:00
Aliaksandr Valialkin
093f94d2db deployment/docker: update Grafana from v6.4.4 to v6.5.0 2019-11-27 15:10:01 +02:00
Aliaksandr Valialkin
8ccbcaf99f deployment/docker: update image tags from v1.29.5-cluster to v1.30.0-cluster 2019-11-27 14:54:21 +02:00
Aliaksandr Valialkin
14ba958e9a deployment/docker: update docker image tag from v1.29.3-cluster to v1.29.5-cluster 2019-11-22 14:05:17 +02:00
Aliaksandr Valialkin
31376fd353 deployment/docker: update docker image tag from v1.29.2-cluster to v1.29.3-cluster 2019-11-13 18:32:08 +02:00
Aliaksandr Valialkin
90bde025f0 deployment/docker: update image tag from v1.29.0-cluster to v1.29.2-cluster 2019-11-13 15:24:44 +02:00
Aliaksandr Valialkin
6afb7a50a9 deployment/docker: upgrade Grafana release from v6.4.3 to v6.4.4 2019-11-12 03:50:54 +02:00
Aliaksandr Valialkin
d420871d79 deployment/docker: upgrade docker image tag from v1.28.3-cluster to v1.29.0-cluster 2019-11-12 03:44:45 +02:00
Aliaksandr Valialkin
584d8362c8 deployment: update Prometheus from v2.13.0 to v2.14.0 2019-11-12 03:43:59 +02:00
Roman Khavronenko
4e7a2a41a4 Cluster dashboard (#222)
* add dashboard for cluster version

* fix queries and panels

* review fixes

* use resident memory for memory usage panel

* fix job selectors
2019-11-07 12:09:27 +02:00
Aliaksandr Valialkin
2ef5082ead deployment/docker: update docker images from v1.28.2-cluster to v1.28.3-cluster 2019-11-05 18:08:50 +02:00