2021-04-07 10:39:16 +00:00
---
2023-10-13 11:54:33 +00:00
weight: 22
2023-04-30 10:31:45 +00:00
title: Quick start
menu:
docs:
2024-07-31 14:03:18 +00:00
identifier: vm-quick-start
parent: victoriametrics
2023-10-13 11:54:33 +00:00
weight: 22
2023-04-30 10:31:45 +00:00
aliases:
- /Quick-Start.html
2021-04-07 10:39:16 +00:00
---
2022-05-17 12:06:58 +00:00
## How to install
2024-08-30 08:36:40 +00:00
VictoriaMetrics is distributed in the following forms:
2024-07-25 10:46:22 +00:00
* [Single-server-VictoriaMetrics ](https://docs.victoriametrics.com/single-server-victoriametrics/ ) - all-in-one
2022-05-17 12:06:58 +00:00
binary, which is very easy to use and maintain.
Single-server-VictoriaMetrics perfectly scales vertically and easily handles millions of metrics/s;
2024-07-25 10:46:22 +00:00
* [VictoriaMetrics Cluster ](https://docs.victoriametrics.com/cluster-victoriametrics/ ) - set of components
2022-05-17 12:06:58 +00:00
for building horizontally scalable clusters.
2024-10-07 08:44:01 +00:00
* [VictoriaMetrics Cloud ](https://console.victoriametrics.cloud/signUp?utm_source=website&utm_campaign=docs_vm_quickstart_guide ) - allows
2024-08-30 08:36:40 +00:00
users to run VictoriaMetrics, hosted on AWS, without the need to perform typical DevOps tasks such as proper configuration, monitoring, logs collection, access protection, software updates, backups, etc.
2022-04-12 11:22:53 +00:00
2024-08-30 08:36:40 +00:00
VictoriaMetrics is available as:
2022-04-12 11:22:53 +00:00
2022-05-17 12:06:58 +00:00
* [Docker images ](https://hub.docker.com/r/victoriametrics/victoria-metrics/ )
2022-04-12 11:22:53 +00:00
* [Helm Charts ](https://github.com/VictoriaMetrics/helm-charts#list-of-charts )
2023-10-18 18:06:23 +00:00
* [Binary releases ](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/latest )
2024-07-08 13:47:24 +00:00
* [Ansible Roles ](https://github.com/VictoriaMetrics/ansible-playbooks )
2022-05-17 12:06:58 +00:00
* [Source code ](https://github.com/VictoriaMetrics/VictoriaMetrics ).
2024-07-25 10:46:22 +00:00
See [How to build from sources ](https://docs.victoriametrics.com/single-server-victoriametrics/#how-to-build-from-sources )
2022-04-12 11:22:53 +00:00
* [VictoriaMetrics on Linode ](https://www.linode.com/marketplace/apps/victoriametrics/victoriametrics/ )
* [VictoriaMetrics on DigitalOcean ](https://marketplace.digitalocean.com/apps/victoriametrics-single )
2022-05-17 12:06:58 +00:00
Just download VictoriaMetrics and follow
2024-07-25 10:46:22 +00:00
[these instructions ](https://docs.victoriametrics.com/single-server-victoriametrics/#how-to-start-victoriametrics ).
Then read [Prometheus setup ](https://docs.victoriametrics.com/single-server-victoriametrics/#prometheus-setup )
and [Grafana setup ](https://docs.victoriametrics.com/single-server-victoriametrics/#grafana-setup ) docs.
2022-05-17 12:06:58 +00:00
2024-07-25 10:46:22 +00:00
VictoriaMetrics is developed at a fast pace, so it is recommended periodically checking the [CHANGELOG ](https://docs.victoriametrics.com/changelog/ ) and performing [regular upgrades ](https://docs.victoriametrics.com/#how-to-upgrade-victoriametrics ).
2022-07-11 18:23:19 +00:00
2024-08-30 08:36:40 +00:00
### Starting VictoriaMetrics Single Node or Cluster on VictoriaMetrics Cloud {anchor="starting-vm-on-cloud"}
The following steps will guide you through starting VictoriaMetrics on VictoriaMetrics Cloud:
2024-10-07 08:44:01 +00:00
1. Go to [VictoriaMetrics Cloud ](https://console.victoriametrics.cloud/signUp?utm_source=website&utm_campaign=docs_vm_quickstart_guide ) and sign up (it's free).
2024-08-30 08:36:40 +00:00
1. After signing up, you will be immediately granted $200 of trial credits you can spend on running Single node or Cluster.
1. Navigate to the VictoriaMetrics Cloud [quick start ](https://docs.victoriametrics.com/victoriametrics-cloud/quickstart/#creating-deployments ) guide for detailed instructions.
2022-04-12 11:22:53 +00:00
2024-07-11 07:35:48 +00:00
### Starting VictoriaMetrics Single Node via Docker {anchor="starting-vm-single-via-docker"}
2019-12-02 20:06:39 +00:00
2022-05-17 12:06:58 +00:00
The following commands download the latest available
[Docker image of VictoriaMetrics ](https://hub.docker.com/r/victoriametrics/victoria-metrics )
and start it at port 8428, while storing the ingested data at `victoria-metrics-data` subdirectory
under the current directory:
2019-11-30 18:36:10 +00:00
2024-01-27 18:29:11 +00:00
```sh
2022-01-03 15:28:38 +00:00
docker pull victoriametrics/victoria-metrics:latest
docker run -it --rm -v `pwd` /victoria-metrics-data:/victoria-metrics-data -p 8428:8428 victoriametrics/victoria-metrics:latest
```
2019-11-30 18:36:10 +00:00
2022-05-17 12:06:58 +00:00
2024-08-06 13:54:52 +00:00
Open `http://localhost:8428` in web browser
2024-07-25 10:46:22 +00:00
and read [these docs ](https://docs.victoriametrics.com/#operation ).
2019-11-30 18:36:10 +00:00
2024-07-25 10:46:22 +00:00
There is also [VictoriaMetrics cluster ](https://docs.victoriametrics.com/cluster-victoriametrics/ )
2022-05-17 12:06:58 +00:00
- horizontally scalable installation, which scales to multiple nodes.
2022-03-22 11:40:55 +00:00
2024-07-11 07:35:48 +00:00
### Starting VictoriaMetrics Cluster via Docker {anchor="starting-vm-cluster-via-docker"}
2022-04-12 11:22:53 +00:00
2022-05-17 12:06:58 +00:00
The following commands clone the latest available
2022-09-21 08:48:38 +00:00
[VictoriaMetrics repository ](https://github.com/VictoriaMetrics/VictoriaMetrics )
and start the docker container via 'make docker-cluster-up'. Further customization is possible by editing
the [docker-compose-cluster.yml ](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/docker-compose-cluster.yml )
2022-05-17 12:06:58 +00:00
file.
2022-04-12 11:22:53 +00:00
2024-01-27 18:29:11 +00:00
```sh
2023-05-31 14:39:38 +00:00
git clone https://github.com/VictoriaMetrics/VictoriaMetrics & & cd VictoriaMetrics
2022-09-21 08:48:38 +00:00
make docker-cluster-up
2022-04-12 11:22:53 +00:00
```
2022-05-17 12:06:58 +00:00
2022-09-21 08:48:38 +00:00
See more details [here ](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker#readme ).
2024-07-25 10:46:22 +00:00
* [Cluster setup ](https://docs.victoriametrics.com/cluster-victoriametrics/#cluster-setup )
2022-04-12 11:22:53 +00:00
2024-07-08 13:47:24 +00:00
2024-07-11 07:35:48 +00:00
### Starting VictoriaMetrics Single Node from a Binary {anchor="starting-vm-single-from-a-binary"}
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
1. Download the correct binary for your OS and architecture from [GitHub ](https://github.com/VictoriaMetrics/VictoriaMetrics/releases ).
2024-07-25 10:46:22 +00:00
For Enterprise binaries see [this link ](https://docs.victoriametrics.com/enterprise/#binary-releases ).
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
2. Extract the archive to /usr/local/bin by running:
```sh
sudo tar -xvf < victoriametrics-archive > -C /usr/local/bin
```
Replace `<victoriametrics-archive>` with the path to the archive you downloaded in step 1.
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
3. Create a VictoriaMetrics user on the system:
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
```sh
sudo useradd -s /usr/sbin/nologin victoriametrics
```
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
4. Create a folder for storing VictoriaMetrics data:
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
```sh
mkdir -p /var/lib/victoria-metrics & & chown -R victoriametrics:victoriametrics /var/lib/victoria-metrics
```
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
5. Create a Linux Service by running the following:
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
```sh
2024-07-08 13:47:24 +00:00
cat < < END > /etc/systemd/system/victoriametrics.service
[Unit]
Description=VictoriaMetrics service
After=network.target
[Service]
Type=simple
User=victoriametrics
Group=victoriametrics
ExecStart=/usr/local/bin/victoria-metrics-prod -storageDataPath=/var/lib/victoria-metrics -retentionPeriod=90d -selfScrapeInterval=10s
SyslogIdentifier=victoriametrics
Restart=always
PrivateTmp=yes
ProtectHome=yes
NoNewPrivileges=yes
ProtectSystem=full
[Install]
WantedBy=multi-user.target
END
```
2024-07-25 10:46:22 +00:00
Extra [command-line flags ](https://docs.victoriametrics.com/#list-of-command-line-flags ) can be added to `ExecStart` line.
2024-07-08 13:47:24 +00:00
2024-07-25 10:46:22 +00:00
If you want to deploy VictoriaMetrics Single Node as a Windows Service review the [running as a Windows service docs ](https://docs.victoriametrics.com/single-server-victoriametrics/#running-as-windows-service ).
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
> Please note, `victoriametrics` service is listening on `:8428` for HTTP connections (see `-httpListenAddr` flag).
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
6. Start and enable the service by running the following command:
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
```sh
sudo systemctl daemon-reload & & sudo systemctl enable --now victoriametrics.service
```
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
7. Check that service started successfully:
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
```sh
sudo systemctl status victoriametrics.service
```
2024-07-08 13:47:24 +00:00
2024-07-25 10:46:22 +00:00
8. After VictoriaMetrics is in `Running` state, verify [vmui ](https://docs.victoriametrics.com/#vmui ) is working
2024-07-09 08:42:55 +00:00
by going to `http://<ip_or_hostname>:8428/vmui` .
2024-07-08 13:47:24 +00:00
2024-07-11 07:35:48 +00:00
### Starting VictoriaMetrics Cluster from Binaries {anchor="starting-vm-cluster-from-binaries"}
2024-07-08 13:47:24 +00:00
2024-07-25 10:46:22 +00:00
VictoriaMetrics cluster consists of [3 components ](https://docs.victoriametrics.com/cluster-victoriametrics/#architecture-overview ).
It is recommended to run these components in the same private network (for [security reasons ](https://docs.victoriametrics.com/#security )),
2024-07-09 08:42:55 +00:00
but on the separate physical nodes for the best performance.
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
On all nodes you will need to do the following:
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
1. Download the correct binary for your OS and architecture with `-cluster` suffix from [GitHub ](https://github.com/VictoriaMetrics/VictoriaMetrics/releases ).
2024-07-25 10:46:22 +00:00
For Enterprise binaries see [this link ](https://docs.victoriametrics.com/enterprise/#binary-releases ).
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
2. Extract the archive to /usr/local/bin by running:
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
```sh
sudo tar -xvf < victoriametrics-archive > -C /usr/local/bin
```
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
Replace `<victoriametrics-archive>` with the path to the archive you downloaded in step 1
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
3. Create a user account for VictoriaMetrics:
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
```sh
sudo useradd -s /usr/sbin/nologin victoriametrics
```
2024-07-08 13:47:24 +00:00
2024-07-25 10:46:22 +00:00
See recommendations for installing each type of [cluster component ](https://docs.victoriametrics.com/cluster-victoriametrics/#architecture-overview ) below.
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
##### Installing vmstorage
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
1. Create a folder for storing `vmstorage` data:
2024-07-08 13:47:24 +00:00
`mkdir -p /var/lib/vmstorage && chown -R victoriametrics:victoriametrics /var/lib/vmstorage`
2024-07-09 08:42:55 +00:00
2. Create a Linux Service for `vmstorage` service by running the following command:
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
```sh
2024-07-08 13:47:24 +00:00
cat < < END > /etc/systemd/system/vmstorage.service
[Unit]
Description=VictoriaMetrics vmstorage service
After=network.target
[Service]
Type=simple
User=victoriametrics
Group=victoriametrics
Restart=always
ExecStart=/usr/local/bin/vmstorage-prod -retentionPeriod=90d -storageDataPath=/var/lib/vmstorage
PrivateTmp=yes
NoNewPrivileges=yes
ProtectSystem=full
[Install]
WantedBy=multi-user.target
END
```
2024-07-25 10:46:22 +00:00
Extra [command-line flags ](https://docs.victoriametrics.com/cluster-victoriametrics/#list-of-command-line-flags-for-vmstorage )
2024-07-09 08:42:55 +00:00
for vmstorage can be added to `ExecStart` line.
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
> Please note, `vmstorage` service is listening on `:8400` for vminsert connections (see `-vminsertAddr` flag),
> on `:8401` for vmselect connections (see `--vmselectAddr` flag) and on `:8482` for HTTP connections (see `-httpListenAddr` flag).
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
3. Start and Enable `vmstorage` :
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
```sh
sudo systemctl daemon-reload & & systemctl enable --now vmstorage
```
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
4. Check that service started successfully:
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
```sh
sudo systemctl status vmstorage
```
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
5. After `vmstorage` is in `Running` state, confirm the service is healthy by visiting `http://<ip_or_hostname>:8482/-/healthy` link.
It should say "VictoriaMetrics is Healthy".
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
##### Installing vminsert
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
1. Create a Linux Service for `vminsert` by running the following command:
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
```sh
2024-07-08 13:47:24 +00:00
cat < < END > /etc/systemd/system/vminsert.service
[Unit]
Description=VictoriaMetrics vminsert service
After=network.target
[Service]
Type=simple
User=victoriametrics
Group=victoriametrics
Restart=always
2024-07-09 08:42:55 +00:00
ExecStart=/usr/local/bin/vminsert-prod -storageNode=< list of vmstorages >
2024-07-08 13:47:24 +00:00
PrivateTmp=yes
NoNewPrivileges=yes
ProtectSystem=full
[Install]
WantedBy=multi-user.target
END
```
2024-07-09 08:42:55 +00:00
Replace `<list of vmstorages>` with addresses of previously configured `vmstorage` services.
To specify multiple addresses you can repeat the flag multiple times, or separate addresses with commas
2024-07-25 10:46:22 +00:00
in one flag. See more details in `-storageNode` flag description [here ](https://docs.victoriametrics.com/cluster-victoriametrics/#list-of-command-line-flags-for-vminsert ).
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
> Please note, `vminsert` service is listening on `:8480` for HTTP connections (see `-httpListenAddr` flag).
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
2. Start and Enable `vminsert` :
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
```sh
sudo systemctl daemon-reload & & sudo systemctl enable --now vminsert.service
```
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
3. Check that service started successfully:
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
```sh
sudo systemctl status vminsert.service
```
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
4. After `vminsert` is in `Running` state, confirm the service is healthy by visiting `http://<ip_or_hostname>:8480/-/healthy` link.
2024-07-08 13:47:24 +00:00
It should say "VictoriaMetrics is Healthy"
2024-07-09 08:42:55 +00:00
##### Installing vmselect
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
1. Create a folder to store temporary cache:
```sh
sudo mkdir -p /var/lib/vmselect-cache & & sudo chown -R victoriametrics:victoriametrics /var/lib/vmselect-cache
```
2024-07-08 13:47:24 +00:00
2. Add a Linux Service for `vmselect` by running
```bash
cat < < END > /etc/systemd/system/vmselect.service
[Unit]
Description=VictoriaMetrics vmselect service
After=network.target
[Service]
Type=simple
User=victoriametrics
Group=victoriametrics
Restart=always
2024-07-09 08:42:55 +00:00
ExecStart=/usr/local/bin/vmselect-prod -storageNode=< list of vmstorages > -cacheDataPath=/var/lib/vmselect-cache
2024-07-08 13:47:24 +00:00
PrivateTmp=yes
NoNewPrivileges=yes
ProtectSystem=full
[Install]
WantedBy=multi-user.target
END
```
2024-07-09 08:42:55 +00:00
Replace `<list of vmstorages>` with addresses of previously configured `vmstorage` services.
To specify multiple addresses you can repeat the flag multiple times, or separate addresses with commas
2024-07-25 10:46:22 +00:00
in one flag. See more details in `-storageNode` flag description [here ](https://docs.victoriametrics.com/cluster-victoriametrics/#list-of-command-line-flags-for-vminsert ).
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
> Please note, `vmselect` service is listening on `:8481` for HTTP connections (see `-httpListenAddr` flag).
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
3. Start and Enable `vmselect` :
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
```sh
sudo systemctl daemon-reload & & sudo systemctl enable --now vmselect.service
```
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
4. Make sure the `vmselect` service is running:
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
```sh
sudo systemctl status vmselect.service
```
2024-07-08 13:47:24 +00:00
2024-07-09 08:42:55 +00:00
5. After `vmselect` is in `Running` state, confirm the service is healthy by visiting `http://<ip_or_hostname>:8481/select/0/vmui` link.
2024-07-25 10:46:22 +00:00
It should open [vmui ](https://docs.victoriametrics.com/#vmui ) page.
2024-07-08 13:47:24 +00:00
2022-05-17 12:06:58 +00:00
## Write data
2022-04-12 11:22:53 +00:00
2022-05-17 12:06:58 +00:00
There are two main models in monitoring for data collection:
2024-07-25 10:46:22 +00:00
[push ](https://docs.victoriametrics.com/keyconcepts/#push-model )
and [pull ](https://docs.victoriametrics.com/keyconcepts/#pull-model ).
2022-05-17 12:06:58 +00:00
Both are used in modern monitoring and both are supported by VictoriaMetrics.
2022-04-12 11:22:53 +00:00
2024-07-25 10:46:22 +00:00
See more details on [writing data here ](https://docs.victoriametrics.com/keyconcepts/#write-data ).
2022-04-12 11:22:53 +00:00
2022-05-17 12:06:58 +00:00
## Query data
2022-04-12 11:22:53 +00:00
2022-05-17 12:06:58 +00:00
VictoriaMetrics provides an
2024-07-25 10:46:22 +00:00
[HTTP API ](https://docs.victoriametrics.com/single-server-victoriametrics/#prometheus-querying-api-usage )
2022-05-17 12:06:58 +00:00
for serving read queries. The API is used in various integrations such as
2024-07-25 10:46:22 +00:00
[Grafana ](https://docs.victoriametrics.com/single-server-victoriametrics/#grafana-setup ).
2022-05-17 12:06:58 +00:00
The same API is also used by
2024-07-25 10:46:22 +00:00
[VMUI ](https://docs.victoriametrics.com/single-server-victoriametrics/#vmui ) - graphical User Interface
2022-05-17 12:06:58 +00:00
for querying and visualizing metrics.
2022-04-12 11:22:53 +00:00
2024-07-25 10:46:22 +00:00
[MetricsQL ](https://docs.victoriametrics.com/metricsql/ ) - is the query language for executing read queries
2022-05-17 12:06:58 +00:00
in VictoriaMetrics. MetricsQL is a [PromQL ](https://prometheus.io/docs/prometheus/latest/querying/basics )
-like query language with a powerful set of functions and features for working specifically with time series data.
2024-07-25 10:46:22 +00:00
See more details on [querying data here ](https://docs.victoriametrics.com/keyconcepts/#query-data )
2022-05-17 12:06:58 +00:00
## Alerting
It is not possible to physically trace all changes on graphs all the time, that is why alerting exists.
2024-07-25 10:46:22 +00:00
In [vmalert ](https://docs.victoriametrics.com/vmalert/ ) it is possible to create a set of conditions
2022-05-17 12:06:58 +00:00
based on PromQL and MetricsQL queries that will send a notification when such conditions are met.
## Data migration
Migrating data from other TSDBs to VictoriaMetrics is as simple as importing data via any of
2024-07-25 10:46:22 +00:00
[supported formats ](https://docs.victoriametrics.com/keyconcepts/#push-model ).
2022-05-17 12:06:58 +00:00
2024-07-25 10:46:22 +00:00
The migration might get easier when using [vmctl ](https://docs.victoriametrics.com/vmctl/ ) - VictoriaMetrics
2022-05-17 12:06:58 +00:00
command line tool. It supports the following databases for migration to VictoriaMetrics:
2024-07-25 10:46:22 +00:00
* [Prometheus using snapshot API ](https://docs.victoriametrics.com/vmctl/#migrating-data-from-prometheus );
* [Thanos ](https://docs.victoriametrics.com/vmctl/#migrating-data-from-thanos );
* [InfluxDB ](https://docs.victoriametrics.com/vmctl/#migrating-data-from-influxdb-1x );
* [OpenTSDB ](https://docs.victoriametrics.com/vmctl/#migrating-data-from-opentsdb );
* [Migrate data between VictoriaMetrics single and cluster versions ](https://docs.victoriametrics.com/vmctl/#migrating-data-from-victoriametrics ).
2022-05-17 12:06:58 +00:00
2024-06-03 08:04:13 +00:00
## Productionization
2022-05-17 12:06:58 +00:00
When going to production with VictoriaMetrics we recommend following the recommendations.
### Monitoring
Each VictoriaMetrics component emits its own metrics with various details regarding performance
and health state. Docs for the components also contain a `Monitoring` section with an explanation
of what and how should be monitored. For example,
2024-07-25 10:46:22 +00:00
[Single-server-VictoriaMetrics Monitoring ](https://docs.victoriametrics.com/cluster-victoriametrics/#monitoring ).
2022-05-17 12:06:58 +00:00
VictoriaMetric team prepared a list of [Grafana dashboards ](https://grafana.com/orgs/victoriametrics/dashboards )
for the main components. Each dashboard contains a lot of useful information and tips. It is recommended
to have these dashboards installed and up to date.
2023-08-03 08:21:18 +00:00
Using the [recommended alerting rules ](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker#alerts )
2022-05-17 12:06:58 +00:00
versions would also help to identify and notify about issues with the system.
2022-09-23 05:12:15 +00:00
The rule of thumb is to have a separate installation of VictoriaMetrics or any other monitoring system
2022-05-17 12:06:58 +00:00
to monitor the production installation of VictoriaMetrics. This would make monitoring independent and
will help identify problems with the main monitoring installation.
2022-09-23 05:12:15 +00:00
See more details in the article [VictoriaMetrics Monitoring ](https://victoriametrics.com/blog/victoriametrics-monitoring/ ).
2022-05-17 12:06:58 +00:00
### Capacity planning
2024-07-25 10:46:22 +00:00
See capacity planning sections in [docs ](https://docs.victoriametrics.com ) for
[Single-server-VictoriaMetrics ](https://docs.victoriametrics.com/single-server-victoriametrics/#capacity-planning )
and [VictoriaMetrics Cluster ](https://docs.victoriametrics.com/cluster-victoriametrics/#capacity-planning ).
2022-05-17 12:06:58 +00:00
Capacity planning isn't possible without [monitoring ](#monitoring ), so consider configuring it first.
Understanding resource usage and performance of VictoriaMetrics also requires knowing the tech terms
2024-07-25 10:46:22 +00:00
[active series ](https://docs.victoriametrics.com/faq/#what-is-an-active-time-series ),
[churn rate ](https://docs.victoriametrics.com/faq/#what-is-high-churn-rate ),
[cardinality ](https://docs.victoriametrics.com/faq/#what-is-high-cardinality ),
[slow inserts ](https://docs.victoriametrics.com/faq/#what-is-a-slow-insert ).
2022-05-17 12:06:58 +00:00
All of them are present in [Grafana dashboards ](https://grafana.com/orgs/victoriametrics/dashboards ).
### Data safety
2024-07-25 10:46:22 +00:00
It is recommended to read [Replication and data safety ](https://docs.victoriametrics.com/cluster-victoriametrics/#replication-and-data-safety ),
2022-05-17 12:06:58 +00:00
[Why replication doesn’ t save from disaster? ](https://valyala.medium.com/speeding-up-backups-for-big-time-series-databases-533c1a927883 )
2024-07-25 10:46:22 +00:00
and [backups ](https://docs.victoriametrics.com/single-server-victoriametrics/#backups ).
2022-04-12 11:22:53 +00:00
2022-05-17 12:06:58 +00:00
### Configuring limits
2022-04-12 11:22:53 +00:00
2022-05-17 12:06:58 +00:00
To avoid excessive resource usage or performance degradation limits must be in place:
2024-07-25 10:46:22 +00:00
* [Resource usage limits ](https://docs.victoriametrics.com/faq/#how-to-set-a-memory-limit-for-victoriametrics-components );
* [Cardinality limiter ](https://docs.victoriametrics.com/single-server-victoriametrics/#cardinality-limiter ).
2023-01-27 23:22:21 +00:00
2023-01-27 23:39:27 +00:00
### Security recommendations
2023-01-27 23:22:21 +00:00
2024-07-25 10:46:22 +00:00
* [Security recommendations for single-node VictoriaMetrics ](https://docs.victoriametrics.com/#security )
* [Security recommendations for cluster version of VictoriaMetrics ](https://docs.victoriametrics.com/cluster-victoriametrics/#security )