mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-05-17 00:26:36 +03:00
deployment/docker: added victorialogs cluster docker compose setup (#8725)
### Describe Your Changes fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/8694 additionally removed container_name, docker network, renamed all compose, config files for consistency Please provide a brief description of the changes you made. Be as specific as possible to help others understand the purpose and impact of your modifications. ### Checklist The following checks are **mandatory**: - [ ] My change adheres to [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --------- Signed-off-by: hagen1778 <roman@victoriametrics.com> Co-authored-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -27,3 +27,4 @@ _site
|
||||
coverage.txt
|
||||
cspell.json
|
||||
*~
|
||||
deployment/docker/provisioning/plugins/
|
||||
|
||||
@@ -19,3 +19,4 @@ dashboards-sync:
|
||||
SRC=backupmanager.json D_UID=gF-lxRdVz TITLE="VictoriaMetrics - backupmanager" $(MAKE) dashboard-copy
|
||||
SRC=clusterbytenant.json D_UID=IZFqd3lMz TITLE="VictoriaMetrics Cluster Per Tenant Statistic" $(MAKE) dashboard-copy
|
||||
SRC=victorialogs.json D_UID=OqPIZTX4z TITLE="VictoriaLogs" $(MAKE) dashboard-copy
|
||||
SRC=victorialogs-cluster.json D_UID=XqCOFEX4z TITLE="VictoriaLogs - cluster" $(MAKE) dashboard-copy
|
||||
|
||||
3743
dashboards/victorialogs-cluster.json
Normal file
3743
dashboards/victorialogs-cluster.json
Normal file
File diff suppressed because it is too large
Load Diff
3744
dashboards/vm/victorialogs-cluster.json
Normal file
3744
dashboards/vm/victorialogs-cluster.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -208,32 +208,40 @@ package-via-docker-386:
|
||||
remove-docker-images:
|
||||
docker image ls --format '{{.ID}}' | xargs docker image rm -f
|
||||
|
||||
docker-single-up:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/docker-compose.yml up -d
|
||||
# VM single
|
||||
docker-vm-single-up:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/compose-vm-single.yml up -d
|
||||
|
||||
docker-single-down:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/docker-compose.yml down -v
|
||||
docker-vm-single-down:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/compose-vm-single.yml down -v
|
||||
|
||||
docker-single-vm-datasource-up:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/docker-compose.yml -f deployment/docker/vm-datasource/docker-compose.yml up -d
|
||||
# VM cluster
|
||||
docker-vm-cluster-up:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/compose-vm-cluster.yml up -d
|
||||
|
||||
docker-single-vm-datasource-down:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/docker-compose.yml -f deployment/docker/vm-datasource/docker-compose.yml down -v
|
||||
docker-vm-cluster-down:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/compose-vm-cluster.yml down -v
|
||||
|
||||
docker-cluster-up:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/docker-compose-cluster.yml up -d
|
||||
# VL single
|
||||
docker-vl-single-up:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/compose-vl-single.yml up -d
|
||||
|
||||
docker-cluster-down:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/docker-compose-cluster.yml down -v
|
||||
docker-vl-single-down:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/compose-vl-single.yml down -v
|
||||
|
||||
docker-cluster-vm-datasource-up:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/docker-compose-cluster.yml -f deployment/docker/vm-datasource/docker-compose-cluster.yml up -d
|
||||
# VL cluster
|
||||
docker-vl-cluster-up:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/compose-vl-cluster.yml up -d
|
||||
|
||||
docker-cluster-vm-datasource-down:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/docker-compose-cluster.yml -f deployment/docker/vm-datasource/docker-compose-cluster.yml down -v
|
||||
docker-vl-cluster-down:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/compose-vl-cluster.yml down -v
|
||||
|
||||
docker-victorialogs-up:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/docker-compose-victorialogs.yml up -d
|
||||
# Command aliases to keep backward-compatibility, as they could have been mentioned on the Internet before the rename.
|
||||
docker-single-up: docker-vm-single-up
|
||||
docker-single-down: docker-vm-single-down
|
||||
|
||||
docker-victorialogs-down:
|
||||
$(DOCKER_COMPOSE) -f deployment/docker/docker-compose-victorialogs.yml down -v
|
||||
docker-cluster-up: docker-vm-cluster-up
|
||||
docker-cluster-down: docker-vm-cluster-down
|
||||
|
||||
docker-victorialogs-up: docker-vl-single-up
|
||||
docker-victorialogs-down: docker-vl-single-down
|
||||
|
||||
@@ -1,41 +1,44 @@
|
||||
# Docker compose environment for VictoriaMetrics
|
||||
|
||||
Docker compose environment for VictoriaMetrics includes VictoriaMetrics components,
|
||||
Docker compose environment for VictoriaMetrics includes VictoriaMetrics and VictoriaLogs components,
|
||||
[Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/)
|
||||
and [Grafana](https://grafana.com/).
|
||||
|
||||
For starting the docker-compose environment ensure you have docker installed and running and access to the Internet.
|
||||
**All commands should be executed from the root directory of [the repo](https://github.com/VictoriaMetrics/VictoriaMetrics).**
|
||||
For starting the docker-compose environment ensure that you have docker installed and running, and that you have access
|
||||
to the Internet.
|
||||
**All commands should be executed from the root directory of [the VictoriaMetrics repo](https://github.com/VictoriaMetrics/VictoriaMetrics).**
|
||||
|
||||
* [VictoriaMetrics single server](#victoriametrics-single-server)
|
||||
* [VictoriaMetrics cluster](#victoriametrics-cluster)
|
||||
* [vmagent](#vmagent)
|
||||
* [vmauth](#vmauth)
|
||||
* [vmalert](#vmalert)
|
||||
* [alertmanager](#alertmanager)
|
||||
* Metrics:
|
||||
* [VictoriaMetrics single server](#victoriametrics-single-server)
|
||||
* [VictoriaMetrics cluster](#victoriametrics-cluster)
|
||||
* [vmagent](#vmagent)
|
||||
* Logs:
|
||||
* [VictoriaLogs single server](#victoriaLogs-server)
|
||||
* [VictoriaLogs cluster](#victoriaLogs-cluster)
|
||||
* [Common](#common-components)
|
||||
* [vmauth](#vmauth)
|
||||
* [vmalert](#vmalert)
|
||||
* [alertmanager](#alertmanager)
|
||||
* [Grafana](#grafana)
|
||||
* [Alerts](#alerts)
|
||||
* [Grafana](#grafana)
|
||||
* [VictoriaLogs](#victoriaLogs-server)
|
||||
|
||||
|
||||
## VictoriaMetrics single server
|
||||
|
||||
To spin-up environment with VictoriaMetrics single server run the following command:
|
||||
```
|
||||
make docker-single-up
|
||||
make docker-vm-single-up
|
||||
```
|
||||
|
||||
VictoriaMetrics will be accessible on the following ports:
|
||||
|
||||
* `--graphiteListenAddr=:2003`
|
||||
* `--opentsdbListenAddr=:4242`
|
||||
* `--httpListenAddr=:8428`
|
||||
|
||||
The communication scheme between components is the following:
|
||||
* [vmagent](#vmagent) sends scraped metrics to `single server VictoriaMetrics`;
|
||||
* [grafana](#grafana) is configured with datasource pointing to `single server VictoriaMetrics`;
|
||||
* [vmalert](#vmalert) is configured to query `single server VictoriaMetrics` and send alerts state
|
||||
and recording rules back to it;
|
||||
* [vmagent](#vmagent) sends scraped metrics to `VictoriaMetrics single-node`;
|
||||
* [grafana](#grafana) is configured with datasource pointing to `VictoriaMetrics single-node`;
|
||||
* [vmalert](#vmalert) is configured to query `VictoriaMetrics single-node`, and send alerts state
|
||||
and recording rules results back to `vmagent`;
|
||||
* [alertmanager](#alertmanager) is configured to receive notifications from `vmalert`.
|
||||
|
||||
<img alt="VictoriaMetrics single-server deployment" width="500" src="assets/vm-single-server.png">
|
||||
@@ -47,31 +50,30 @@ use link [http://localhost:8428/vmui](http://localhost:8428/vmui).
|
||||
|
||||
To access `vmalert` use link [http://localhost:8428/vmalert](http://localhost:8428/vmalert/).
|
||||
|
||||
To shutdown environment execute the following command:
|
||||
To shutdown environment run:
|
||||
```
|
||||
make docker-single-down
|
||||
make docker-vm-single-down
|
||||
```
|
||||
|
||||
|
||||
## VictoriaMetrics cluster
|
||||
|
||||
To spin-up environment with VictoriaMetrics cluster run the following command:
|
||||
```
|
||||
make docker-cluster-up
|
||||
make docker-vm-cluster-up
|
||||
```
|
||||
|
||||
VictoriaMetrics cluster environment consists of `vminsert`, `vmstorage` and `vmselect` components.
|
||||
`vminsert` has exposed port `:8480`, access to `vmselect` components goes through `vmauth` on port `:8427`,
|
||||
`vminsert` exposes port `:8480` for ingestion. Access to `vmselect` for reads goes through `vmauth` on port `:8427`,
|
||||
and the rest of components are available only inside the environment.
|
||||
|
||||
The communication scheme between components is the following:
|
||||
* [vmagent](#vmagent) sends scraped metrics to `vminsert`;
|
||||
* `vminsert` forwards data to `vmstorage`;
|
||||
* `vminsert` shards and forwards data to `vmstorage`;
|
||||
* `vmselect`s are connected to `vmstorage` for querying data;
|
||||
* [vmauth](#vmauth) balances incoming read requests among `vmselect`s;
|
||||
* [grafana](#grafana) is configured with datasource pointing to `vmauth`;
|
||||
* [vmalert](#vmalert) is configured to query `vmselect`s via `vmauth` and send alerts state
|
||||
and recording rules to `vminsert`;
|
||||
and recording rules to `vmagent`;
|
||||
* [alertmanager](#alertmanager) is configured to receive notifications from `vmalert`.
|
||||
|
||||
<img alt="VictoriaMetrics cluster deployment" width="500" src="assets/vm-cluster.png">
|
||||
@@ -85,118 +87,88 @@ To access `vmalert` use link [http://localhost:8427/select/0/prometheus/vmalert/
|
||||
|
||||
To shutdown environment execute the following command:
|
||||
```
|
||||
make docker-cluster-down
|
||||
make docker-vm-cluster-down
|
||||
```
|
||||
|
||||
## vmagent
|
||||
|
||||
vmagent is used for scraping and pushing time series to VictoriaMetrics instance.
|
||||
It accepts Prometheus-compatible configuration [prometheus.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/prometheus.yml)
|
||||
with listed targets for scraping.
|
||||
It accepts Prometheus-compatible configuration with listed targets for scraping:
|
||||
* [scraping VictoriaMetrics single-node](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/prometheus-vm-single.yml) services;
|
||||
* [scraping VictoriaMetrics cluster](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/prometheus-vm-cluster.yml) services;
|
||||
* [scraping VictoriaLogs single-node](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/prometheus-vl-single.yml) services;
|
||||
* [scraping VictoriaLogs cluster](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/prometheus-vl-cluster.yml) services;
|
||||
|
||||
[Web interface link](http://localhost:8429/).
|
||||
|
||||
## vmauth
|
||||
|
||||
[vmauth](https://docs.victoriametrics.com/vmauth/) acts as a [balancer](https://docs.victoriametrics.com/vmauth/#load-balancing)
|
||||
to spread the load across `vmselect`'s. [Grafana](#grafana) and [vmalert](#vmalert) use vmauth for read queries.
|
||||
vmauth config is available [here](ttps://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/auth-cluster.yml)
|
||||
|
||||
|
||||
## vmalert
|
||||
|
||||
vmalert evaluates alerting rules [alerts.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts.yml)
|
||||
to track VictoriaMetrics health state. It is connected with AlertManager for firing alerts,
|
||||
and with VictoriaMetrics for executing queries and storing alert's state.
|
||||
|
||||
[Web interface link](http://localhost:8880/).
|
||||
|
||||
## alertmanager
|
||||
|
||||
AlertManager accepts notifications from `vmalert` and fires alerts.
|
||||
All notifications are blackholed according to [alertmanager.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alertmanager.yml) config.
|
||||
|
||||
[Web interface link](http://localhost:9093/).
|
||||
|
||||
## Grafana
|
||||
|
||||
To access service open following [link](http://localhost:3000).
|
||||
|
||||
Default credential:
|
||||
|
||||
* login - `admin`
|
||||
* password - `admin`
|
||||
|
||||
Grafana is provisioned by default with following entities:
|
||||
|
||||
* `VictoriaMetrics` datasource
|
||||
* `VictoriaMetrics - cluster` datasource
|
||||
* `VictoriaMetrics overview` dashboard
|
||||
* `VictoriaMetrics - cluster` dashboard
|
||||
* `VictoriaMetrics - vmagent` dashboard
|
||||
* `VictoriaMetrics - vmalert` dashboard
|
||||
|
||||
Remember to pick `VictoriaMetrics - cluster` datasource when viewing `VictoriaMetrics - cluster` dashboard.
|
||||
|
||||
Optionally, environment with [VictoriaMetrics Grafana datasource](https://github.com/VictoriaMetrics/victoriametrics-datasource)
|
||||
can be started with the following commands:
|
||||
```
|
||||
make docker-single-vm-datasource-up # start single server
|
||||
make docker-single-vm-datasource-down # shut down single server
|
||||
|
||||
make docker-cluster-vm-datasource-up # start cluster
|
||||
make docker-cluster-vm-datasource-down # shutdown cluster
|
||||
```
|
||||
|
||||
## Alerts
|
||||
|
||||
See below a list of recommended alerting rules for various VictoriaMetrics components for running in production.
|
||||
Some alerting rules thresholds are just recommendations and could require an adjustment.
|
||||
The list of alerting rules is the following:
|
||||
* [alerts-health.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-health.yml):
|
||||
alerting rules related to all VictoriaMetrics components for tracking their "health" state;
|
||||
* [alerts.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts.yml):
|
||||
alerting rules related to [single-server VictoriaMetrics](https://docs.victoriametrics.com/single-server-victoriametrics/) installation;
|
||||
* [alerts-cluster.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-cluster.yml):
|
||||
alerting rules related to [cluster version of VictoriaMetrics](https://docs.victoriametrics.com/cluster-victoriametrics/);
|
||||
* [alerts-vmagent.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmagent.yml):
|
||||
alerting rules related to [vmagent](https://docs.victoriametrics.com/vmagent/) component;
|
||||
* [alerts-vmalert.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmalert.yml):
|
||||
alerting rules related to [vmalert](https://docs.victoriametrics.com/vmalert/) component;
|
||||
* [alerts-vmauth.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmauth.yml):
|
||||
alerting rules related to [vmauth](https://docs.victoriametrics.com/vmauth/) component;
|
||||
* [alerts-vlogs.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vlogs.yml):
|
||||
alerting rules related to [VictoriaLogs](https://docs.victoriametrics.com/victorialogs/);
|
||||
* [alerts-vmanomaly.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmanomaly.yml):
|
||||
alerting rules related to [VictoriaMetrics Anomaly Detection](https://docs.victoriametrics.com/anomaly-detection/);
|
||||
|
||||
Please, also see [how to monitor](https://docs.victoriametrics.com/single-server-victoriametrics/#monitoring)
|
||||
VictoriaMetrics installations.
|
||||
Web interface link is [http://localhost:8429/](http://localhost:8429/).
|
||||
|
||||
## VictoriaLogs server
|
||||
|
||||
To spin-up environment with VictoriaLogs run the following command:
|
||||
```
|
||||
make docker-victorialogs-up
|
||||
make docker-vl-single-up
|
||||
```
|
||||
|
||||
VictoriaLogs will be accessible on the `--httpListenAddr=:9428` port.
|
||||
In addition to VictoriaLogs server, the docker compose contains the following components:
|
||||
* [vector](https://vector.dev/guides/) service for collecting docker logs and sending them to VictoriaLogs;
|
||||
* VictoriaMetrics single server to collect metrics from `VictoriaLogs` and `vector`;
|
||||
* [grafana](#grafana) is configured with [VictoriaLogs datasource](https://github.com/VictoriaMetrics/victorialogs-datasource).
|
||||
* `VictoriaMetrics single-node` to collect metrics from all the components;
|
||||
* [Grafana](#grafana) is configured with [VictoriaLogs datasource](https://github.com/VictoriaMetrics/victorialogs-datasource).
|
||||
* [vmalert](#vmalert) is configured to query `VictoriaLogs single-node`, and send alerts state
|
||||
and recording rules results to `VictoriaMetrics single-node`;
|
||||
* [alertmanager](#alertmanager) is configured to receive notifications from `vmalert`.
|
||||
|
||||
<img alt="VictoriaLogs single-server deployment" width="500" src="assets/vl-single-server.png">
|
||||
|
||||
To access Grafana use link [http://localhost:3000](http://localhost:3000).
|
||||
|
||||
To access [VictoriaLogs UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui)
|
||||
use link [http://localhost:9428/select/vmui](http://localhost:9428/select/vmui).
|
||||
use link [http://localhost:8427/logs/select/vmui](http://localhost:8427/logs/select/vmui).
|
||||
|
||||
Please, also see [how to monitor](https://docs.victoriametrics.com/victorialogs/#monitoring)
|
||||
VictoriaLogs installations.
|
||||
|
||||
To shutdown environment execute the following command:
|
||||
```
|
||||
make docker-victorialogs-down
|
||||
make docker-vl-single-down
|
||||
```
|
||||
|
||||
## VictoriaLogs cluster
|
||||
|
||||
To spin-up environment with VictoriaLogs cluster run the following command:
|
||||
```
|
||||
make docker-vl-cluster-up
|
||||
```
|
||||
|
||||
VictoriaLogs cluster environment consists of `vlinsert`, `vlstorage` and `vlselect` components.
|
||||
`vlinsert` and `vlselect` are available through `vmauth` on port `:8427`:
|
||||
* `vlselect` - `http://localhost:8427/logs/select`.
|
||||
* `vlinsert` - `http://localhost:8427/logs/insert`.
|
||||
and the rest of components are available only inside the environment.
|
||||
|
||||
In addition to VictoriaLogs cluster, the docker compose contains the following components:
|
||||
* [vector](https://vector.dev/guides/) service for collecting docker logs and sending them to `vlinsert`;
|
||||
* [Grafana](#grafana) is configured with [VictoriaLogs datasource](https://github.com/VictoriaMetrics/victorialogs-datasource) and pointing to `vmauth`.
|
||||
* `VictoriaMetrics single-node` to collect metrics from all the components;
|
||||
* `vlinsert` forwards ingested data to `vlstorage`
|
||||
* `vlselect`s are connected to `vlstorage` for querying data;
|
||||
* [vmauth](#vmauth) balances incoming read and write requests among `vlselect`s and `vlinsert`s;
|
||||
* [vmalert](#vmalert) is configured to query `vlselect`s, and send alerts state
|
||||
and recording rules results to `VictoriaMetrics single-node`;
|
||||
* [alertmanager](#alertmanager) is configured to receive notifications from `vmalert`.
|
||||
|
||||
<img alt="VictoriaLogs cluster deployment" width="500" src="assets/vl-cluster.png">
|
||||
|
||||
To access Grafana use link [http://localhost:3000](http://localhost:3000).
|
||||
|
||||
To access [VictoriaLogs UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui)
|
||||
use link [http://localhost:8427/logs/select/vmui](http://localhost:8427/logs/select/vmui).
|
||||
|
||||
Please, also see [how to monitor](https://docs.victoriametrics.com/victorialogs/#monitoring)
|
||||
VictoriaLogs installations.
|
||||
|
||||
To shutdown environment execute the following command:
|
||||
```
|
||||
make docker-vl-cluster-down
|
||||
```
|
||||
|
||||
Please see more examples on integration of VictoriaLogs with other log shippers below:
|
||||
@@ -211,3 +183,64 @@ Please see more examples on integration of VictoriaLogs with other log shippers
|
||||
* [telegraf](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker/victorialogs/telegraf)
|
||||
* [fluentd](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker/victorialogs/fluentd)
|
||||
* [datadog-serverless](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker/victorialogs/datadog-serverless)
|
||||
|
||||
# Common components
|
||||
|
||||
## vmauth
|
||||
|
||||
[vmauth](https://docs.victoriametrics.com/vmauth/) acts as a [load balancer](https://docs.victoriametrics.com/vmauth/#load-balancing)
|
||||
to spread the load across `vmselect`'s or `vlselect`'s. [Grafana](#grafana) and [vmalert](#vmalert) use vmauth for read queries.
|
||||
vmauth routes read queries to VictoriaMetrics or VictoriaLogs depending on requested path.
|
||||
vmauth config is available here for [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/auth-vm-cluster.yml),
|
||||
[VictoriaLogs single-server](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/auth-vl-single.yml),
|
||||
[VictoriaLogs cluster](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/auth-vl-cluster.yml).
|
||||
|
||||
|
||||
## vmalert
|
||||
|
||||
vmalert evaluates various [alerting rules](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules).
|
||||
It is connected with AlertManager for firing alerts, and with VictoriaMetrics or VictoriaLogs for executing queries and storing alert's state.
|
||||
|
||||
Web interface link [http://localhost:8880/](http://localhost:8880/).
|
||||
|
||||
## alertmanager
|
||||
|
||||
AlertManager accepts notifications from `vmalert` and fires alerts.
|
||||
All notifications are blackholed according to [alertmanager.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alertmanager.yml) config.
|
||||
|
||||
Web interface link [http://localhost:9093/](http://localhost:9093/).
|
||||
|
||||
## Grafana
|
||||
|
||||
Web interface link [http://localhost:3000](http://localhost:3000).
|
||||
|
||||
Default credentials:
|
||||
* login: `admin`
|
||||
* password: `admin`
|
||||
|
||||
Grafana is provisioned with default dashboards and datasources.
|
||||
|
||||
## Alerts
|
||||
|
||||
See below a list of recommended alerting rules for various VictoriaMetrics components for running in production.
|
||||
Some alerting rules thresholds are just recommendations and could require an adjustment.
|
||||
The list of alerting rules is the following:
|
||||
* [alerts-health.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-health.yml):
|
||||
alerting rules related to all VictoriaMetrics components for tracking their "health" state;
|
||||
* [alerts.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts.yml):
|
||||
alerting rules related to [single-server VictoriaMetrics](https://docs.victoriametrics.com/single-server-victoriametrics/) installation;
|
||||
* [alerts-cluster.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-cluster.yml):
|
||||
alerting rules related to [cluster version of VictoriaMetrics](https://docs.victoriametrics.com/cluster-victoriametrics/);
|
||||
* [alerts-vmagent.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmagent.yml):
|
||||
alerting rules related to [vmagent](https://docs.victoriametrics.com/vmagent/) component;
|
||||
* [alerts-vmalert.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmalert.yml):
|
||||
alerting rules related to [vmalert](https://docs.victoriametrics.com/vmalert/) component;
|
||||
* [alerts-vmauth.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmauth.yml):
|
||||
alerting rules related to [vmauth](https://docs.victoriametrics.com/vmauth/) component;
|
||||
* [alerts-vlogs.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vlogs.yml):
|
||||
alerting rules related to [VictoriaLogs](https://docs.victoriametrics.com/victorialogs/);
|
||||
* [alerts-vmanomaly.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vmanomaly.yml):
|
||||
alerting rules related to [VictoriaMetrics Anomaly Detection](https://docs.victoriametrics.com/anomaly-detection/);
|
||||
|
||||
Please, also see [how to monitor VictoriaMetrics installations](https://docs.victoriametrics.com/single-server-victoriametrics/#monitoring)
|
||||
and [how to monitor VictoriaLogs installations](https://docs.victoriametrics.com/victorialogs/#monitoring).
|
||||
|
||||
File diff suppressed because one or more lines are too long
BIN
deployment/docker/assets/vl-cluster.png
Normal file
BIN
deployment/docker/assets/vl-cluster.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 114 KiB |
BIN
deployment/docker/assets/vl-single-server.png
Normal file
BIN
deployment/docker/assets/vl-single-server.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 99 KiB |
15
deployment/docker/auth-vl-cluster.yml
Normal file
15
deployment/docker/auth-vl-cluster.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
# route requests between VictoriaMetrics and VictoriaLogs
|
||||
unauthorized_user:
|
||||
url_map:
|
||||
- src_paths:
|
||||
- "/api/v1/.*"
|
||||
url_prefix: http://victoriametrics:8428
|
||||
- src_paths:
|
||||
- "/select/logsql/.*"
|
||||
url_prefix:
|
||||
- http://vlselect-1:9428
|
||||
- http://vlselect-2:9428
|
||||
- src_paths:
|
||||
- "/insert/.*"
|
||||
url_prefix:
|
||||
- http://vlinsert:9428
|
||||
@@ -2,8 +2,9 @@
|
||||
unauthorized_user:
|
||||
url_map:
|
||||
- src_paths:
|
||||
- "/api/v1/query.*"
|
||||
url_prefix: "http://victoriametrics:8428"
|
||||
- "/api/v1/.*"
|
||||
url_prefix: http://victoriametrics:8428
|
||||
- src_paths:
|
||||
- "/select/logsql/.*"
|
||||
url_prefix: "http://victorialogs:9428"
|
||||
url_prefix:
|
||||
- http://victorialogs:9428
|
||||
@@ -1,6 +1,14 @@
|
||||
# balance load among vmselects
|
||||
# see https://docs.victoriametrics.com/vmauth/#load-balancing
|
||||
unauthorized_user:
|
||||
url_prefix:
|
||||
url_map:
|
||||
- src_paths:
|
||||
- "/select/.*"
|
||||
url_prefix:
|
||||
- http://vmselect-1:8481
|
||||
- http://vmselect-2:8481
|
||||
- src_paths:
|
||||
- "/insert/.*"
|
||||
url_prefix:
|
||||
- http://vminsert-1:8480
|
||||
- http://vminsert-2:8480
|
||||
141
deployment/docker/compose-vl-cluster.yml
Normal file
141
deployment/docker/compose-vl-cluster.yml
Normal file
@@ -0,0 +1,141 @@
|
||||
services:
|
||||
# Grafana instance configured with VictoriaLogs as datasource
|
||||
grafana:
|
||||
image: grafana/grafana:11.5.0
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
- "vmauth"
|
||||
ports:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
- grafanadata:/var/lib/grafana
|
||||
- ./provisioning/datasources/victoriametrics-logs-datasource/cluster.yml:/etc/grafana/provisioning/datasources/cluster.yml
|
||||
- ./provisioning/dashboards:/etc/grafana/provisioning/dashboards
|
||||
- ./provisioning/plugins/:/var/lib/grafana/plugins
|
||||
- ./../../dashboards/victoriametrics.json:/var/lib/grafana/dashboards/vm.json
|
||||
- ./../../dashboards/victorialogs-cluster.json:/var/lib/grafana/dashboards/vl.json
|
||||
environment:
|
||||
- "GF_INSTALL_PLUGINS=victoriametrics-logs-datasource"
|
||||
restart: always
|
||||
|
||||
# vector is logs collector. It collects logs according to vector.yml
|
||||
# and forwards them to VictoriaLogs
|
||||
vector:
|
||||
image: docker.io/timberio/vector:0.46.X-distroless-libc
|
||||
volumes:
|
||||
- type: bind
|
||||
source: /var/run/docker.sock
|
||||
target: /var/run/docker.sock
|
||||
- type: bind
|
||||
source: /var/lib/docker
|
||||
target: /var/lib/docker
|
||||
- ./vector-vl-cluster.yml:/etc/vector/vector.yaml:ro
|
||||
depends_on: [vmauth]
|
||||
ports:
|
||||
- "8686:8686"
|
||||
user: root
|
||||
|
||||
vlinsert:
|
||||
image: victoriametrics/victoria-logs:v1.19.0-victorialogs
|
||||
command:
|
||||
- "--storageNode=vlstorage-1:9428"
|
||||
- "--storageNode=vlstorage-2:9428"
|
||||
|
||||
vlselect-1:
|
||||
image: victoriametrics/victoria-logs:v1.19.0-victorialogs
|
||||
command:
|
||||
- "--storageNode=vlstorage-1:9428"
|
||||
- "--storageNode=vlstorage-2:9428"
|
||||
vlselect-2:
|
||||
image: victoriametrics/victoria-logs:v1.19.0-victorialogs
|
||||
command:
|
||||
- "--storageNode=vlstorage-1:9428"
|
||||
- "--storageNode=vlstorage-2:9428"
|
||||
|
||||
vlstorage-1:
|
||||
image: victoriametrics/victoria-logs:v1.19.0-victorialogs
|
||||
command:
|
||||
- "--storageDataPath=/vlogs"
|
||||
volumes:
|
||||
- vldata-1:/vlogs
|
||||
vlstorage-2:
|
||||
image: victoriametrics/victoria-logs:v1.19.0-victorialogs
|
||||
command:
|
||||
- "--storageDataPath=/vlogs"
|
||||
volumes:
|
||||
- vldata-2:/vlogs
|
||||
|
||||
# VictoriaMetrics instance, a single process responsible for
|
||||
# scraping, storing metrics and serve read requests.
|
||||
victoriametrics:
|
||||
image: victoriametrics/victoria-metrics:v1.115.0
|
||||
volumes:
|
||||
- vmdata:/storage
|
||||
- ./prometheus-vl-cluster.yml:/etc/prometheus/prometheus.yml
|
||||
command:
|
||||
- "--storageDataPath=/storage"
|
||||
- "--promscrape.config=/etc/prometheus/prometheus.yml"
|
||||
restart: always
|
||||
|
||||
# vmauth is a router and balancer for HTTP requests.
|
||||
# It proxies query requests from vmalert to either VictoriaMetrics or VictoriaLogs,
|
||||
# depending on the requested path.
|
||||
vmauth:
|
||||
image: victoriametrics/vmauth:v1.115.0
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
- "vlselect-1"
|
||||
- "vlselect-2"
|
||||
- "vlinsert"
|
||||
volumes:
|
||||
- ./auth-vl-cluster.yml:/etc/auth.yml
|
||||
command:
|
||||
- "--auth.config=/etc/auth.yml"
|
||||
ports:
|
||||
- 8427:8427
|
||||
restart: always
|
||||
|
||||
# vmalert executes alerting and recording rules according to given rule type.
|
||||
vmalert:
|
||||
image: victoriametrics/vmalert:v1.115.0
|
||||
depends_on:
|
||||
- "vmauth"
|
||||
- "alertmanager"
|
||||
- "victoriametrics"
|
||||
ports:
|
||||
- 8880:8880
|
||||
volumes:
|
||||
- ./rules/alerts.yml:/etc/alerts/alerts.yml
|
||||
- ./rules/alerts-vlogs.yml:/etc/alerts/vlogs.yml
|
||||
- ./rules/alerts-health.yml:/etc/alerts/alerts-health.yml
|
||||
- ./rules/alerts-vmagent.yml:/etc/alerts/alerts-vmagent.yml
|
||||
- ./rules/alerts-vmalert.yml:/etc/alerts/alerts-vmalert.yml
|
||||
# vlogs rule
|
||||
- ./rules/vlogs-example-alerts.yml:/etc/alerts/vlogs-example-alerts.yml
|
||||
command:
|
||||
- "--datasource.url=http://vmauth:8427/"
|
||||
- "--remoteRead.url=http://victoriametrics:8428/"
|
||||
- "--remoteWrite.url=http://victoriametrics:8428/"
|
||||
- "--notifier.url=http://alertmanager:9093/"
|
||||
- "--rule=/etc/alerts/*.yml"
|
||||
# display source of alerts in grafana
|
||||
- "--external.url=http://127.0.0.1:3000" #grafana outside container
|
||||
restart: always
|
||||
|
||||
# alertmanager receives alerting notifications from vmalert
|
||||
# and distributes them according to --config.file.
|
||||
alertmanager:
|
||||
image: prom/alertmanager:v0.28.0
|
||||
volumes:
|
||||
- ./alertmanager.yml:/config/alertmanager.yml
|
||||
command:
|
||||
- "--config.file=/config/alertmanager.yml"
|
||||
ports:
|
||||
- 9093:9093
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
vmdata: {}
|
||||
vldata-1: {}
|
||||
vldata-2: {}
|
||||
grafanadata: {}
|
||||
@@ -1,7 +1,6 @@
|
||||
services:
|
||||
# Grafana instance configured with VictoriaLogs as datasource
|
||||
grafana:
|
||||
container_name: grafana
|
||||
image: grafana/grafana:11.5.0
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
@@ -10,21 +9,19 @@ services:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
- grafanadata:/var/lib/grafana
|
||||
- ./provisioning/datasources/victoriametrics-logs-datasource:/etc/grafana/provisioning/datasources
|
||||
- ./provisioning/datasources/victoriametrics-logs-datasource/single.yml:/etc/grafana/provisioning/datasources/single.yml
|
||||
- ./provisioning/dashboards:/etc/grafana/provisioning/dashboards
|
||||
- ./provisioning/plugins/:/var/lib/grafana/plugins
|
||||
- ./../../dashboards/victoriametrics.json:/var/lib/grafana/dashboards/vm.json
|
||||
- ./../../dashboards/victorialogs.json:/var/lib/grafana/dashboards/vl.json
|
||||
environment:
|
||||
- "GF_INSTALL_PLUGINS=victoriametrics-logs-datasource"
|
||||
networks:
|
||||
- vm_net
|
||||
restart: always
|
||||
|
||||
# vector is logs collector. It collects logs according to vector.yaml
|
||||
# vector is logs collector. It collects logs according to vector.yml
|
||||
# and forwards them to VictoriaLogs
|
||||
vector:
|
||||
image: docker.io/timberio/vector:0.42.X-distroless-libc
|
||||
image: docker.io/timberio/vector:0.46.X-distroless-libc
|
||||
volumes:
|
||||
- type: bind
|
||||
source: /var/run/docker.sock
|
||||
@@ -32,70 +29,52 @@ services:
|
||||
- type: bind
|
||||
source: /var/lib/docker
|
||||
target: /var/lib/docker
|
||||
- ./vector.yaml:/etc/vector/vector.yaml:ro
|
||||
- ./vector-vl-single.yml:/etc/vector/vector.yaml:ro
|
||||
depends_on: [victorialogs]
|
||||
ports:
|
||||
- "8686:8686"
|
||||
user: root
|
||||
networks:
|
||||
- vm_net
|
||||
|
||||
# VictoriaLogs instance, a single process responsible for
|
||||
# storing logs and serving read queries.
|
||||
victorialogs:
|
||||
container_name: victorialogs
|
||||
image: victoriametrics/victoria-logs:v1.19.0-victorialogs
|
||||
command:
|
||||
- "--storageDataPath=/vlogs"
|
||||
- "--httpListenAddr=:9428"
|
||||
volumes:
|
||||
- vldata:/vlogs
|
||||
ports:
|
||||
- "9428:9428"
|
||||
networks:
|
||||
- vm_net
|
||||
|
||||
# VictoriaMetrics instance, a single process responsible for
|
||||
# scraping, storing metrics and serve read requests.
|
||||
victoriametrics:
|
||||
container_name: victoriametrics
|
||||
image: victoriametrics/victoria-metrics:v1.113.0
|
||||
ports:
|
||||
- 8428:8428
|
||||
image: victoriametrics/victoria-metrics:v1.115.0
|
||||
volumes:
|
||||
- vmdata:/storage
|
||||
- ./prometheus-victorialogs.yml:/etc/prometheus/prometheus.yml
|
||||
- ./prometheus-vl-single.yml:/etc/prometheus/prometheus.yml
|
||||
command:
|
||||
- "--storageDataPath=/storage"
|
||||
- "--httpListenAddr=:8428"
|
||||
- "--promscrape.config=/etc/prometheus/prometheus.yml"
|
||||
networks:
|
||||
- vm_net
|
||||
restart: always
|
||||
|
||||
# vmauth is a router and balancer for HTTP requests.
|
||||
# It proxies query requests from vmalert to either VictoriaMetrics or VictoriaLogs,
|
||||
# depending on the requested path.
|
||||
vmauth:
|
||||
container_name: vmauth
|
||||
image: victoriametrics/vmauth:v1.113.0
|
||||
image: victoriametrics/vmauth:v1.115.0
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
- "victorialogs"
|
||||
volumes:
|
||||
- ./auth-mixed-datasource.yml:/etc/auth.yml
|
||||
- ./auth-vl-single.yml:/etc/auth.yml
|
||||
command:
|
||||
- "--auth.config=/etc/auth.yml"
|
||||
ports:
|
||||
- 8427:8427
|
||||
networks:
|
||||
- vm_net
|
||||
restart: always
|
||||
|
||||
# vmalert executes alerting and recording rules according to given rule type.
|
||||
# vmalert executes alerting and recording rules according to the given rule type.
|
||||
vmalert:
|
||||
container_name: vmalert
|
||||
image: victoriametrics/vmalert:v1.113.0
|
||||
image: victoriametrics/vmalert:v1.115.0
|
||||
depends_on:
|
||||
- "vmauth"
|
||||
- "alertmanager"
|
||||
@@ -106,7 +85,6 @@ services:
|
||||
- ./rules/alerts.yml:/etc/alerts/alerts.yml
|
||||
- ./rules/alerts-vlogs.yml:/etc/alerts/vlogs.yml
|
||||
- ./rules/alerts-health.yml:/etc/alerts/alerts-health.yml
|
||||
- ./rules/alerts-vmagent.yml:/etc/alerts/alerts-vmagent.yml
|
||||
- ./rules/alerts-vmalert.yml:/etc/alerts/alerts-vmalert.yml
|
||||
# vlogs rule
|
||||
- ./rules/vlogs-example-alerts.yml:/etc/alerts/vlogs-example-alerts.yml
|
||||
@@ -118,14 +96,11 @@ services:
|
||||
- "--rule=/etc/alerts/*.yml"
|
||||
# display source of alerts in grafana
|
||||
- "--external.url=http://127.0.0.1:3000" #grafana outside container
|
||||
networks:
|
||||
- vm_net
|
||||
restart: always
|
||||
|
||||
# alertmanager receives alerting notifications from vmalert
|
||||
# and distributes them according to --config.file.
|
||||
alertmanager:
|
||||
container_name: alertmanager
|
||||
image: prom/alertmanager:v0.28.0
|
||||
volumes:
|
||||
- ./alertmanager.yml:/config/alertmanager.yml
|
||||
@@ -133,13 +108,9 @@ services:
|
||||
- "--config.file=/config/alertmanager.yml"
|
||||
ports:
|
||||
- 9093:9093
|
||||
networks:
|
||||
- vm_net
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
vmdata: {}
|
||||
vldata: {}
|
||||
grafanadata: {}
|
||||
networks:
|
||||
vm_net:
|
||||
@@ -3,23 +3,20 @@ services:
|
||||
# It scrapes targets defined in --promscrape.config
|
||||
# And forward them to --remoteWrite.url
|
||||
vmagent:
|
||||
container_name: vmagent
|
||||
image: victoriametrics/vmagent:v1.115.0
|
||||
depends_on:
|
||||
- "vminsert"
|
||||
- "vmauth"
|
||||
ports:
|
||||
- 8429:8429
|
||||
volumes:
|
||||
- vmagentdata:/vmagentdata
|
||||
- ./prometheus-cluster.yml:/etc/prometheus/prometheus.yml
|
||||
- ./prometheus-vm-cluster.yml:/etc/prometheus/prometheus.yml
|
||||
command:
|
||||
- "--promscrape.config=/etc/prometheus/prometheus.yml"
|
||||
- "--remoteWrite.url=http://vminsert:8480/insert/0/prometheus/"
|
||||
- "--remoteWrite.url=http://vmauth:8427/insert/0/prometheus/api/v1/write"
|
||||
restart: always
|
||||
|
||||
# Grafana instance configured with VictoriaMetrics as datasource
|
||||
grafana:
|
||||
container_name: grafana
|
||||
image: grafana/grafana:11.5.0
|
||||
depends_on:
|
||||
- "vmauth"
|
||||
@@ -38,24 +35,14 @@ services:
|
||||
# vmstorage shards. Each shard receives 1/N of all metrics sent to vminserts,
|
||||
# where N is number of vmstorages (2 in this case).
|
||||
vmstorage-1:
|
||||
container_name: vmstorage-1
|
||||
image: victoriametrics/vmstorage:v1.115.0-cluster
|
||||
ports:
|
||||
- 8482
|
||||
- 8400
|
||||
- 8401
|
||||
volumes:
|
||||
- strgdata-1:/storage
|
||||
command:
|
||||
- "--storageDataPath=/storage"
|
||||
restart: always
|
||||
vmstorage-2:
|
||||
container_name: vmstorage-2
|
||||
image: victoriametrics/vmstorage:v1.115.0-cluster
|
||||
ports:
|
||||
- 8482
|
||||
- 8400
|
||||
- 8401
|
||||
volumes:
|
||||
- strgdata-2:/storage
|
||||
command:
|
||||
@@ -64,8 +51,16 @@ services:
|
||||
|
||||
# vminsert is ingestion frontend. It receives metrics pushed by vmagent,
|
||||
# pre-process them and distributes across configured vmstorage shards.
|
||||
vminsert:
|
||||
container_name: vminsert
|
||||
vminsert-1:
|
||||
image: victoriametrics/vminsert:v1.115.0-cluster
|
||||
depends_on:
|
||||
- "vmstorage-1"
|
||||
- "vmstorage-2"
|
||||
command:
|
||||
- "--storageNode=vmstorage-1:8400"
|
||||
- "--storageNode=vmstorage-2:8400"
|
||||
restart: always
|
||||
vminsert-2:
|
||||
image: victoriametrics/vminsert:v1.115.0-cluster
|
||||
depends_on:
|
||||
- "vmstorage-1"
|
||||
@@ -73,14 +68,11 @@ services:
|
||||
command:
|
||||
- "--storageNode=vmstorage-1:8400"
|
||||
- "--storageNode=vmstorage-2:8400"
|
||||
ports:
|
||||
- 8480:8480
|
||||
restart: always
|
||||
|
||||
# vmselect is a query fronted. It serves read queries in MetricsQL or PromQL.
|
||||
# vmselect collects results from configured `--storageNode` shards.
|
||||
vmselect-1:
|
||||
container_name: vmselect-1
|
||||
image: victoriametrics/vmselect:v1.115.0-cluster
|
||||
depends_on:
|
||||
- "vmstorage-1"
|
||||
@@ -89,11 +81,8 @@ services:
|
||||
- "--storageNode=vmstorage-1:8401"
|
||||
- "--storageNode=vmstorage-2:8401"
|
||||
- "--vmalert.proxyURL=http://vmalert:8880"
|
||||
ports:
|
||||
- 8481
|
||||
restart: always
|
||||
vmselect-2:
|
||||
container_name: vmselect-2
|
||||
image: victoriametrics/vmselect:v1.115.0-cluster
|
||||
depends_on:
|
||||
- "vmstorage-1"
|
||||
@@ -102,8 +91,6 @@ services:
|
||||
- "--storageNode=vmstorage-1:8401"
|
||||
- "--storageNode=vmstorage-2:8401"
|
||||
- "--vmalert.proxyURL=http://vmalert:8880"
|
||||
ports:
|
||||
- 8481
|
||||
restart: always
|
||||
|
||||
# vmauth is a router and balancer for HTTP requests.
|
||||
@@ -111,13 +98,12 @@ services:
|
||||
# read requests from Grafana, vmui, vmalert among vmselects.
|
||||
# It can be used as an authentication proxy.
|
||||
vmauth:
|
||||
container_name: vmauth
|
||||
image: victoriametrics/vmauth:v1.115.0
|
||||
depends_on:
|
||||
- "vmselect-1"
|
||||
- "vmselect-2"
|
||||
volumes:
|
||||
- ./auth-cluster.yml:/etc/auth.yml
|
||||
- ./auth-vm-cluster.yml:/etc/auth.yml
|
||||
command:
|
||||
- "--auth.config=/etc/auth.yml"
|
||||
ports:
|
||||
@@ -126,7 +112,6 @@ services:
|
||||
|
||||
# vmalert executes alerting and recording rules
|
||||
vmalert:
|
||||
container_name: vmalert
|
||||
image: victoriametrics/vmalert:v1.115.0
|
||||
depends_on:
|
||||
- "vmauth"
|
||||
@@ -140,7 +125,7 @@ services:
|
||||
command:
|
||||
- "--datasource.url=http://vmauth:8427/select/0/prometheus"
|
||||
- "--remoteRead.url=http://vmauth:8427/select/0/prometheus"
|
||||
- "--remoteWrite.url=http://vminsert:8480/insert/0/prometheus"
|
||||
- "--remoteWrite.url=http://vmauth:8427/insert/0/prometheus/api/v1/write"
|
||||
- "--notifier.url=http://alertmanager:9093/"
|
||||
- "--rule=/etc/alerts/*.yml"
|
||||
# display source of alerts in grafana
|
||||
@@ -151,7 +136,6 @@ services:
|
||||
# alertmanager receives alerting notifications from vmalert
|
||||
# and distributes them according to --config.file.
|
||||
alertmanager:
|
||||
container_name: alertmanager
|
||||
image: prom/alertmanager:v0.28.0
|
||||
volumes:
|
||||
- ./alertmanager.yml:/config/alertmanager.yml
|
||||
@@ -3,7 +3,6 @@ services:
|
||||
# It scrapes targets defined in --promscrape.config
|
||||
# And forward them to --remoteWrite.url
|
||||
vmagent:
|
||||
container_name: vmagent
|
||||
image: victoriametrics/vmagent:v1.115.0
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
@@ -11,7 +10,7 @@ services:
|
||||
- 8429:8429
|
||||
volumes:
|
||||
- vmagentdata:/vmagentdata
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
- ./prometheus-vm-single.yml:/etc/prometheus/prometheus.yml
|
||||
command:
|
||||
- "--promscrape.config=/etc/prometheus/prometheus.yml"
|
||||
- "--remoteWrite.url=http://victoriametrics:8428/api/v1/write"
|
||||
@@ -19,7 +18,6 @@ services:
|
||||
# VictoriaMetrics instance, a single process responsible for
|
||||
# storing metrics and serve read requests.
|
||||
victoriametrics:
|
||||
container_name: victoriametrics
|
||||
image: victoriametrics/victoria-metrics:v1.115.0
|
||||
ports:
|
||||
- 8428:8428
|
||||
@@ -39,9 +37,7 @@ services:
|
||||
- "--vmalert.proxyURL=http://vmalert:8880"
|
||||
restart: always
|
||||
|
||||
# Grafana instance configured with VictoriaMetrics as datasource
|
||||
grafana:
|
||||
container_name: grafana
|
||||
image: grafana/grafana:11.5.0
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
@@ -58,7 +54,6 @@ services:
|
||||
|
||||
# vmalert executes alerting and recording rules
|
||||
vmalert:
|
||||
container_name: vmalert
|
||||
image: victoriametrics/vmalert:v1.115.0
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
@@ -84,7 +79,6 @@ services:
|
||||
# alertmanager receives alerting notifications from vmalert
|
||||
# and distributes them according to --config.file.
|
||||
alertmanager:
|
||||
container_name: alertmanager
|
||||
image: prom/alertmanager:v0.28.0
|
||||
volumes:
|
||||
- ./alertmanager.yml:/config/alertmanager.yml
|
||||
@@ -1,22 +0,0 @@
|
||||
global:
|
||||
scrape_interval: 10s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'vmagent'
|
||||
static_configs:
|
||||
- targets: ['vmagent:8429']
|
||||
- job_name: 'vmauth'
|
||||
static_configs:
|
||||
- targets: ['vmauth:8427']
|
||||
- job_name: 'vmalert'
|
||||
static_configs:
|
||||
- targets: ['vmalert:8880']
|
||||
- job_name: 'vminsert'
|
||||
static_configs:
|
||||
- targets: ['vminsert:8480']
|
||||
- job_name: 'vmselect'
|
||||
static_configs:
|
||||
- targets: ['vmselect-1:8481', 'vmselect-2:8481']
|
||||
- job_name: 'vmstorage'
|
||||
static_configs:
|
||||
- targets: ['vmstorage-1:8482', 'vmstorage-2:8482']
|
||||
@@ -1,16 +0,0 @@
|
||||
global:
|
||||
scrape_interval: 10s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'victoriametrics'
|
||||
static_configs:
|
||||
- targets: ['victoriametrics:8428']
|
||||
- job_name: 'vmalert'
|
||||
static_configs:
|
||||
- targets: [ 'vmalert:8880' ]
|
||||
- job_name: 'victorialogs'
|
||||
static_configs:
|
||||
- targets: ['victorialogs:9428']
|
||||
- job_name: 'fluentbit'
|
||||
static_configs:
|
||||
- targets: ['fluentbit:2020/api/v1/metrics/prometheus']
|
||||
26
deployment/docker/prometheus-vl-cluster.yml
Normal file
26
deployment/docker/prometheus-vl-cluster.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
global:
|
||||
scrape_interval: 10s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: victoriametrics
|
||||
static_configs:
|
||||
- targets:
|
||||
- victoriametrics:8428
|
||||
- job_name: vmalert
|
||||
static_configs:
|
||||
- targets:
|
||||
- vmalert:8880
|
||||
- job_name: vlstorage
|
||||
static_configs:
|
||||
- targets:
|
||||
- vlstorage-1:9428
|
||||
- vlstorage-2:9428
|
||||
- job_name: vlselect
|
||||
static_configs:
|
||||
- targets:
|
||||
- vlselect-1:9428
|
||||
- vlselect-2:9428
|
||||
- job_name: vlinsert
|
||||
static_configs:
|
||||
- targets:
|
||||
- vlinsert:9428
|
||||
16
deployment/docker/prometheus-vl-single.yml
Normal file
16
deployment/docker/prometheus-vl-single.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
global:
|
||||
scrape_interval: 10s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: victoriametrics
|
||||
static_configs:
|
||||
- targets:
|
||||
- victoriametrics:8428
|
||||
- job_name: vmalert
|
||||
static_configs:
|
||||
- targets:
|
||||
- vmalert:8880
|
||||
- job_name: victorialogs
|
||||
static_configs:
|
||||
- targets:
|
||||
- victorialogs:9428
|
||||
30
deployment/docker/prometheus-vm-cluster.yml
Normal file
30
deployment/docker/prometheus-vm-cluster.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
global:
|
||||
scrape_interval: 10s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: vmagent
|
||||
static_configs:
|
||||
- targets:
|
||||
- vmagent:8429
|
||||
- job_name: vmauth
|
||||
static_configs:
|
||||
- targets:
|
||||
- vmauth:8427
|
||||
- job_name: vmalert
|
||||
static_configs:
|
||||
- targets:
|
||||
- vmalert:8880
|
||||
- job_name: vminsert
|
||||
static_configs:
|
||||
- targets:
|
||||
- vminsert:8480
|
||||
- job_name: vmselect
|
||||
static_configs:
|
||||
- targets:
|
||||
- vmselect-1:8481
|
||||
- vmselect-2:8481
|
||||
- job_name: vmstorage
|
||||
static_configs:
|
||||
- targets:
|
||||
- vmstorage-1:8482
|
||||
- vmstorage-2:8482
|
||||
16
deployment/docker/prometheus-vm-single.yml
Normal file
16
deployment/docker/prometheus-vm-single.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
global:
|
||||
scrape_interval: 10s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: vmagent
|
||||
static_configs:
|
||||
- targets:
|
||||
- vmagent:8429
|
||||
- job_name: vmalert
|
||||
static_configs:
|
||||
- targets:
|
||||
- vmalert:8880
|
||||
- job_name: victoriametrics
|
||||
static_configs:
|
||||
- targets:
|
||||
- victoriametrics:8428
|
||||
@@ -1,13 +0,0 @@
|
||||
global:
|
||||
scrape_interval: 10s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'vmagent'
|
||||
static_configs:
|
||||
- targets: ['vmagent:8429']
|
||||
- job_name: 'vmalert'
|
||||
static_configs:
|
||||
- targets: ['vmalert:8880']
|
||||
- job_name: 'victoriametrics'
|
||||
static_configs:
|
||||
- targets: ['victoriametrics:8428']
|
||||
@@ -4,9 +4,9 @@ datasources:
|
||||
- name: VictoriaLogs
|
||||
type: victoriametrics-logs-datasource
|
||||
access: proxy
|
||||
url: http://victorialogs:9428
|
||||
url: http://vmauth:8427
|
||||
|
||||
- name: VictoriaMetrics
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: http://victoriametrics:8428
|
||||
url: http://vmauth:8427
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: VictoriaLogs
|
||||
type: victoriametrics-logs-datasource
|
||||
access: proxy
|
||||
url: http://vmauth:8427/
|
||||
|
||||
- name: VictoriaMetrics
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: http://vmauth:8427/
|
||||
@@ -1,13 +0,0 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: VictoriaMetrics - cluster
|
||||
type: victoriametrics-metrics-datasource
|
||||
access: proxy
|
||||
url: http://vmauth:8427/select/0/prometheus
|
||||
isDefault: true
|
||||
# see https://grafana.com/docs/grafana/latest/administration/provisioning/#json-data
|
||||
jsonData:
|
||||
# vmuiUrl will auto resolve into http://vmauth:8427 and won't work at user's machine
|
||||
# so we override it
|
||||
vmuiUrl: http://localhost:8427/select/0/vmui
|
||||
@@ -1,13 +0,0 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: VictoriaMetrics
|
||||
type: victoriametrics-metrics-datasource
|
||||
access: proxy
|
||||
url: http://victoriametrics:8428
|
||||
isDefault: true
|
||||
# see https://grafana.com/docs/grafana/latest/administration/provisioning/#json-data
|
||||
jsonData:
|
||||
# vmuiUrl will auto resolve into http://victoriametrics:8428 and won't work at user's machine
|
||||
# so we override it
|
||||
vmuiUrl: http://localhost:8428/vmui
|
||||
@@ -7,7 +7,7 @@ groups:
|
||||
# note the `job` filter and update accordingly to your setup
|
||||
rules:
|
||||
- alert: TooManyRestarts
|
||||
expr: changes(process_start_time_seconds{job=~".*(victoriametrics|vmselect|vminsert|vmstorage|vmagent|vmalert|vmsingle|vmalertmanager|vmauth).*"}[15m]) > 2
|
||||
expr: changes(process_start_time_seconds{job=~".*(victoriametrics|vmselect|vminsert|vmstorage|vmagent|vmalert|vmsingle|vmalertmanager|vmauth|victorialogs|vlstorage|vlselect|vlinsert).*"}[15m]) > 2
|
||||
labels:
|
||||
severity: critical
|
||||
annotations:
|
||||
@@ -17,7 +17,7 @@ groups:
|
||||
It might be crashlooping.
|
||||
|
||||
- alert: ServiceDown
|
||||
expr: up{job=~".*(victoriametrics|vmselect|vminsert|vmstorage|vmagent|vmalert|vmsingle|vmalertmanager|vmauth).*"} == 0
|
||||
expr: up{job=~".*(victoriametrics|vmselect|vminsert|vmstorage|vmagent|vmalert|vmsingle|vmalertmanager|vmauth|victorialogs|vlstorage|vlselect|vlinsert).*"} == 0
|
||||
for: 2m
|
||||
labels:
|
||||
severity: critical
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
# and threshold calibration according to every specific setup.
|
||||
groups:
|
||||
- name: vlogs
|
||||
interval: 30s
|
||||
concurrency: 2
|
||||
rules:
|
||||
- alert: DiskRunsOutOfSpace
|
||||
expr: |
|
||||
|
||||
41
deployment/docker/vector-vl-cluster.yml
Normal file
41
deployment/docker/vector-vl-cluster.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
api:
|
||||
enabled: true
|
||||
address: 0.0.0.0:8686
|
||||
sources:
|
||||
docker:
|
||||
type: docker_logs
|
||||
demo:
|
||||
type: demo_logs
|
||||
format: apache_common
|
||||
interval: 10
|
||||
vector_metrics:
|
||||
type: internal_metrics
|
||||
transforms:
|
||||
msg_parser:
|
||||
type: remap
|
||||
inputs: [docker]
|
||||
source: |
|
||||
.message = parse_json(.message) ?? .message
|
||||
sinks:
|
||||
elasticsearch:
|
||||
type: elasticsearch
|
||||
inputs: [demo, msg_parser]
|
||||
endpoints: [http://vmauth:8427/insert/elasticsearch/]
|
||||
mode: bulk
|
||||
api_version: v8
|
||||
compression: gzip
|
||||
healthcheck:
|
||||
enabled: false
|
||||
request:
|
||||
headers:
|
||||
VL-Stream-Fields: source_type,label.com.docker.compose.service
|
||||
VL-Time-Field: timestamp
|
||||
VL-Msg-Field: message,msg,_msg,message.message,message.log
|
||||
AccountID: "0"
|
||||
ProjectID: "0"
|
||||
victoriametrics:
|
||||
type: prometheus_remote_write
|
||||
endpoint: http://victoriametrics:8428/api/v1/write
|
||||
inputs: [vector_metrics]
|
||||
healthcheck:
|
||||
enabled: false
|
||||
@@ -30,7 +30,7 @@ sinks:
|
||||
headers:
|
||||
VL-Stream-Fields: source_type,label.com.docker.compose.service
|
||||
VL-Time-Field: timestamp
|
||||
VL-Msg-Field: message,log
|
||||
VL-Msg-Field: message,msg,_msg,message.message,message.log
|
||||
AccountID: "0"
|
||||
ProjectID: "0"
|
||||
victoriametrics:
|
||||
@@ -19,7 +19,7 @@ services:
|
||||
retries: 10
|
||||
|
||||
dd-proxy:
|
||||
image: docker.io/victoriametrics/vmauth:v1.113.0
|
||||
image: docker.io/victoriametrics/vmauth:v1.115.0
|
||||
restart: on-failure
|
||||
volumes:
|
||||
- ./:/etc/vmauth
|
||||
|
||||
@@ -31,10 +31,10 @@ Querying the data
|
||||
* for querying the data via command-line please check [these docs](https://docs.victoriametrics.com/victorialogs/querying/#command-line)
|
||||
|
||||
OpenTelemetry collector configuration example can be found below:
|
||||
* [loki](./loki/config.yaml)
|
||||
* [otlp](./otlp/config.yaml)
|
||||
* [syslog](./syslog/config.yaml)
|
||||
* [elasticsearch single node](./elasticsearch/config.yaml)
|
||||
* [elasticsearch HA mode](./elasticsearch-ha/config.yaml)
|
||||
* [loki](./loki/config.yml)
|
||||
* [otlp](./otlp/config.yml)
|
||||
* [syslog](./syslog/config.yml)
|
||||
* [elasticsearch single node](./elasticsearch/config.yml)
|
||||
* [elasticsearch HA mode](./elasticsearch-ha/config.yml)
|
||||
|
||||
Please, note that `_stream_fields` parameter must follow recommended [best practices](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields) to achieve better performance.
|
||||
|
||||
@@ -6,7 +6,7 @@ services:
|
||||
restart: on-failure
|
||||
user: 0:0
|
||||
volumes:
|
||||
- ${PWD}/config.yaml:/etc/otelcol-contrib/config.yaml
|
||||
- ${PWD}/config.yml:/etc/otelcol-contrib/config.yaml
|
||||
- /var/lib/docker/containers:/var/lib/docker/containers
|
||||
depends_on:
|
||||
victorialogs:
|
||||
|
||||
@@ -31,10 +31,10 @@ Querying the data
|
||||
* for querying the data via command-line please check [these docs](https://docs.victoriametrics.com/victorialogs/querying/#command-line)
|
||||
|
||||
Vector configuration example can be found below:
|
||||
* [elasticsearch](./elasticsearch/vector.yaml)
|
||||
* [loki](./loki/vector.yaml)
|
||||
* [jsonline single node](./jsonline/vector.yaml)
|
||||
* [jsonline HA setup](./jsonline-ha/vector.yaml)
|
||||
* [datadog](./datadog/vector.yaml)
|
||||
* [elasticsearch](./elasticsearch/vector.yml)
|
||||
* [loki](./loki/vector.yml)
|
||||
* [jsonline single node](./jsonline/vector.yml)
|
||||
* [jsonline HA setup](./jsonline-ha/vector.yml)
|
||||
* [datadog](./datadog/vector.yml)
|
||||
|
||||
Please, note that `_stream_fields` parameter must follow recommended [best practices](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields) to achieve better performance.
|
||||
|
||||
@@ -11,7 +11,7 @@ services:
|
||||
- type: bind
|
||||
source: /var/lib/docker
|
||||
target: /var/lib/docker
|
||||
- ${PWD}/vector.yaml:/etc/vector/vector.yaml:ro
|
||||
- ${PWD}/vector.yml:/etc/vector/vector.yaml:ro
|
||||
user: root
|
||||
ports:
|
||||
- '8686:8686'
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
services:
|
||||
grafana:
|
||||
container_name: grafana
|
||||
image: grafana/grafana:11.5.0
|
||||
depends_on:
|
||||
- "vmauth"
|
||||
ports:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
- grafanadata:/var/lib/grafana
|
||||
- ./provisioning/datasources/victoriametrics-metrics-datasource/cluster.yml:/etc/grafana/provisioning/datasources/cluster.yml
|
||||
- ./provisioning/dashboards:/etc/grafana/provisioning/dashboards
|
||||
- ./../../dashboards/vm/victoriametrics-cluster.json:/var/lib/grafana/dashboards/vm.json
|
||||
- ./../../dashboards/vm/vmagent.json:/var/lib/grafana/dashboards/vmagent.json
|
||||
- ./../../dashboards/vm/vmalert.json:/var/lib/grafana/dashboards/vmalert.json
|
||||
- ./../../dashboards/vm/vmauth.json:/var/lib/grafana/dashboards/vmauth.json
|
||||
environment:
|
||||
- "GF_INSTALL_PLUGINS=victoriametrics-metrics-datasource"
|
||||
restart: always
|
||||
@@ -1,20 +0,0 @@
|
||||
services:
|
||||
grafana:
|
||||
container_name: grafana
|
||||
image: grafana/grafana:11.5.0
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
ports:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
- grafanadata:/var/lib/grafana
|
||||
- ./provisioning/datasources/victoriametrics-metrics-datasource/single.yml:/etc/grafana/provisioning/datasources/single.yml
|
||||
- ./provisioning/dashboards:/etc/grafana/provisioning/dashboards
|
||||
- ./../../dashboards/vm/victoriametrics.json:/var/lib/grafana/dashboards/vm.json
|
||||
- ./../../dashboards/vm/vmagent.json:/var/lib/grafana/dashboards/vmagent.json
|
||||
- ./../../dashboards/vm/vmalert.json:/var/lib/grafana/dashboards/vmalert.json
|
||||
environment:
|
||||
- GF_INSTALL_PLUGINS=victoriametrics-metrics-datasource
|
||||
networks:
|
||||
- vm_net
|
||||
restart: always
|
||||
@@ -1,7 +1,6 @@
|
||||
services:
|
||||
vmagent:
|
||||
container_name: vmagent
|
||||
image: victoriametrics/vmagent:v1.113.0
|
||||
image: victoriametrics/vmagent:v1.115.0
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
ports:
|
||||
@@ -12,13 +11,10 @@ services:
|
||||
command:
|
||||
- "--promscrape.config=/etc/prometheus/prometheus.yml"
|
||||
- "--remoteWrite.url=http://victoriametrics:8428/api/v1/write"
|
||||
networks:
|
||||
- vm_net
|
||||
restart: always
|
||||
|
||||
victoriametrics:
|
||||
container_name: victoriametrics
|
||||
image: victoriametrics/victoria-metrics:v1.113.0
|
||||
image: victoriametrics/victoria-metrics:v1.115.0
|
||||
ports:
|
||||
- 8428:8428
|
||||
volumes:
|
||||
@@ -28,12 +24,9 @@ services:
|
||||
- "--httpListenAddr=:8428"
|
||||
- "--vmalert.proxyURL=http://vmalert:8880"
|
||||
- "-search.disableCache=1" # for guide only, do not use in production
|
||||
networks:
|
||||
- vm_net
|
||||
restart: always
|
||||
|
||||
grafana:
|
||||
container_name: grafana
|
||||
image: grafana/grafana-oss:10.2.1
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
@@ -44,13 +37,10 @@ services:
|
||||
- ./provisioning/datasources:/etc/grafana/provisioning/datasources
|
||||
- ./provisioning/dashboards:/etc/grafana/provisioning/dashboards
|
||||
- ./vmanomaly_guide_dashboard.json:/var/lib/grafana/dashboards/vmanomaly_guide_dashboard.json
|
||||
networks:
|
||||
- vm_net
|
||||
restart: always
|
||||
|
||||
vmalert:
|
||||
container_name: vmalert
|
||||
image: victoriametrics/vmalert:v1.113.0
|
||||
image: victoriametrics/vmalert:v1.115.0
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
ports:
|
||||
@@ -67,18 +57,13 @@ services:
|
||||
- "--external.url=http://127.0.0.1:3000" #grafana outside container
|
||||
# when copypaste the line be aware of '$$' for escaping in '$expr'
|
||||
- '--external.alert.source=explore?orgId=1&left=["now-1h","now","VictoriaMetrics",{"expr": },{"mode":"Metrics"},{"ui":[true,true,true,"none"]}]'
|
||||
networks:
|
||||
- vm_net
|
||||
restart: always
|
||||
vmanomaly:
|
||||
container_name: vmanomaly
|
||||
image: victoriametrics/vmanomaly:v1.21.0
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
ports:
|
||||
- "8490:8490"
|
||||
networks:
|
||||
- vm_net
|
||||
restart: always
|
||||
volumes:
|
||||
- ./vmanomaly_config.yml:/config.yaml
|
||||
@@ -88,7 +73,6 @@ services:
|
||||
- "/config.yaml"
|
||||
- "--licenseFile=/license"
|
||||
alertmanager:
|
||||
container_name: alertmanager
|
||||
image: prom/alertmanager:v0.28.0
|
||||
volumes:
|
||||
- ./alertmanager.yml:/config/alertmanager.yml
|
||||
@@ -96,23 +80,16 @@ services:
|
||||
- "--config.file=/config/alertmanager.yml"
|
||||
ports:
|
||||
- 9093:9093
|
||||
networks:
|
||||
- vm_net
|
||||
restart: always
|
||||
|
||||
node-exporter:
|
||||
image: quay.io/prometheus/node-exporter:v1.7.0
|
||||
container_name: node-exporter
|
||||
ports:
|
||||
- 9100:9100
|
||||
pid: host
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- vm_net
|
||||
|
||||
volumes:
|
||||
vmagentdata-guide-vmanomaly-vmalert: {}
|
||||
vmdata-guide-vmanomaly-vmalert: {}
|
||||
grafanadata-guide-vmanomaly-vmalert: {}
|
||||
networks:
|
||||
vm_net:
|
||||
@@ -16,6 +16,9 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta
|
||||
|
||||
## tip
|
||||
|
||||
* FEATURE: [dashboards/cluster](https://grafana.com/grafana/dashboards/23274): add Grafana dashboard for cluster version of VictoriaLogs. The source of the dashboard is available [here](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards/victorialogs-cluster.json) and will continue improving with time.
|
||||
* FEATURE: [deployment/docker](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker#readme): add [docker-compose environment for VictoriaLogs cluster](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker#victorialogs-cluster) deployment. It is intended for demonstrative purposes, includes alerting and Grafana dashboards.
|
||||
|
||||
## [v1.19.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.19.0-victorialogs)
|
||||
|
||||
Released at 2025-04-17
|
||||
|
||||
@@ -123,7 +123,7 @@ Pass `-help` to VictoriaLogs in order to see the list of supported command-line
|
||||
VictoriaLogs stores the ingested data to the `victoria-logs-data` directory by default. The directory can be changed
|
||||
via `-storageDataPath` command-line flag. See [these docs](https://docs.victoriametrics.com/victorialogs/#storage) for details.
|
||||
|
||||
By default VictoriaLogs stores [log entries](https://docs.victoriametrics.com/victorialogs/keyconcepts/) with timestamps
|
||||
By default, VictoriaLogs stores [log entries](https://docs.victoriametrics.com/victorialogs/keyconcepts/) with timestamps
|
||||
in the time range `[now-7d, now]`, while dropping logs outside the given time range.
|
||||
E.g. it uses the retention of 7 days. Read [these docs](https://docs.victoriametrics.com/victorialogs/#retention) on how to control the retention
|
||||
for the [ingested](https://docs.victoriametrics.com/victorialogs/data-ingestion/) logs.
|
||||
@@ -137,7 +137,10 @@ See also:
|
||||
|
||||
## Docker demos
|
||||
|
||||
Here are a Docker-compose demos, which start VictoriaLogs and push logs to it via various log collectors:
|
||||
Docker-compose demos for single-node and cluster version of VictoriaLogs that include logs collection,
|
||||
monitoring, alerting and Grafana are available [here](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker#readme).
|
||||
|
||||
Docker-compose demos that integrate VictoriaLogs and various log collectors:
|
||||
|
||||
- [Filebeat demo](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker/victorialogs/filebeat)
|
||||
- [Fluentbit demo](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker/victorialogs/fluentbit)
|
||||
|
||||
@@ -58,7 +58,8 @@ It is recommended to set up monitoring of these metrics via VictoriaMetrics
|
||||
(see [these docs](https://docs.victoriametrics.com/#how-to-scrape-prometheus-exporters-such-as-node-exporter)),
|
||||
vmagent (see [these docs](https://docs.victoriametrics.com/vmagent/#how-to-collect-metrics-in-prometheus-format)) or via Prometheus.
|
||||
|
||||
We recommend installing [Grafana dashboard for VictoriaLogs](https://grafana.com/grafana/dashboards/22084).
|
||||
We recommend installing Grafana dashboard for [VictoriaLogs single-node](https://grafana.com/grafana/dashboards/22084)
|
||||
or [cluster](https://grafana.com/grafana/dashboards/23274) (if link is unavailable use [source link](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards/victorialogs-cluster.json)).
|
||||
|
||||
We recommend setting up [alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/rules/alerts-vlogs.yml)
|
||||
via [vmalert](https://docs.victoriametrics.com/vmalert/) or via Prometheus.
|
||||
@@ -82,7 +83,7 @@ The following steps must be performed during the upgrade / downgrade procedure:
|
||||
|
||||
## Retention
|
||||
|
||||
By default VictoriaLogs stores log entries with timestamps in the time range `[now-7d, now]`, while dropping logs outside the given time range.
|
||||
By default, VictoriaLogs stores log entries with timestamps in the time range `[now-7d, now]`, while dropping logs outside the given time range.
|
||||
E.g. it uses the retention of 7 days. The retention can be configured with `-retentionPeriod` command-line flag.
|
||||
This flag accepts values starting from `1d` (one day) up to `100y` (100 years). See [these docs](https://prometheus.io/docs/prometheus/latest/querying/basics/#time-durations)
|
||||
for the supported duration formats.
|
||||
|
||||
Reference in New Issue
Block a user