* 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>
9.1 KiB
sort |
---|
13 |
Quick start
How to install
VictoriaMetrics is distributed in two forms:
- Single-server-VictoriaMetrics - all-in-one binary, which is very easy to use and maintain. Single-server-VictoriaMetrics perfectly scales vertically and easily handles millions of metrics/s;
- VictoriaMetrics Cluster - set of components for building horizontally scalable clusters.
Single-server-VictoriaMetrics VictoriaMetrics is available as:
- Managed VictoriaMetrics at AWS
- Docker images
- Snap packages
- Helm Charts
- Binary releases
- Source code. See How to build from sources
- VictoriaMetrics on Linode
- VictoriaMetrics on DigitalOcean
Just download VictoriaMetrics and follow these instructions. Then read Prometheus setup and Grafana setup docs.
VictoriaMetrics is developed at a fast pace, so it is recommended periodically checking the CHANGELOG and performing regular upgrades.
Starting VM-Single via Docker
The following commands download the latest available
Docker image of VictoriaMetrics
and start it at port 8428, while storing the ingested data at victoria-metrics-data
subdirectory
under the current directory:
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
Open http://localhost:8428 in web browser and read these docs.
There is also VictoriaMetrics cluster
- horizontally scalable installation, which scales to multiple nodes.
Starting VM-Cluster via Docker
The following commands clone the latest available VictoriaMetrics repository and start the docker container via 'make docker-cluster-up'. Further customization is possible by editing the docker-compose-cluster.yml file.
git clone https://github.com/VictoriaMetrics/VictoriaMetrics &&
make docker-cluster-up
See more details here.
Write data
There are two main models in monitoring for data collection: push and pull. Both are used in modern monitoring and both are supported by VictoriaMetrics.
See more details on writing data here.
Query data
VictoriaMetrics provides an HTTP API for serving read queries. The API is used in various integrations such as Grafana. The same API is also used by VMUI - graphical User Interface for querying and visualizing metrics.
MetricsQL - is he query language for executing read queries in VictoriaMetrics. MetricsQL is a PromQL -like query language with a powerful set of functions and features for working specifically with time series data.
See more details on querying data here
Alerting
It is not possible to physically trace all changes on graphs all the time, that is why alerting exists. In vmalert it is possible to create a set of conditions 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 supported formats.
The migration might get easier when using vmctl - VictoriaMetrics command line tool. It supports the following databases for migration to VictoriaMetrics:
- Prometheus using snapshot API;
- Thanos;
- InfluxDB;
- OpenTSDB;
- Migrate data between VictoriaMetrics single and cluster versions.
Productionisation
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,
Single-server-VictoriaMetrics Monitoring.
VictoriaMetric team prepared a list of Grafana 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.
The list of alerts for single and cluster versions would also help to identify and notify about issues with the system.
The rule of the thumb is to have a separate installation of VictoriaMetrics or any other monitoring system to monitor the production installation of VictoriaMetrics. This would make monitoring independent and will help identify problems with the main monitoring installation.
Capacity planning
See capacity planning sections in docs for Single-server-VictoriaMetrics. and VictoriaMetrics Cluster.
Capacity planning isn't possible without monitoring, so consider configuring it first. Understanding resource usage and performance of VictoriaMetrics also requires knowing the tech terms active series, churn rate, cardinality, slow inserts. All of them are present in Grafana dashboards.
Data safety
It is recommended to read Replication and data safety, Why replication doesn’t save from disaster? and backups.
Configuring limits
To avoid excessive resource usage or performance degradation limits must be in place: