2019-12-02 21:06:39 +01:00
# Quick Start
2020-11-18 18:44:40 +01:00
1. If you run Ubuntu, then just run `snap install victoriametrics` command in order to install and start VictoriaMetrics, then read [these docs ](https://snapcraft.io/victoriametrics ).
Otherwise download the latest VictoriaMetrics release from [releases page ](https://github.com/VictoriaMetrics/VictoriaMetrics/releases ),
2020-05-16 09:23:08 +02:00
from [Docker hub ](https://hub.docker.com/r/victoriametrics/victoria-metrics/ )
2020-12-11 20:08:13 +01:00
or [build it from sources ](https://victoriametrics.github.io/Single-server-VictoriaMetrics.html#how-to-build-from-sources ).
2019-11-30 19:36:10 +01:00
2020-11-18 18:44:40 +01:00
2. This step isn't needed if you run VictoriaMetrics via `snap install victoriametrics` as described above.
Otherwise run the binary or Docker image with the desired command-line flags. Pass `-help` in order to see description for all the available flags
2019-11-30 19:36:10 +01:00
and their default values. Default flag values should fit the majoirty of cases. The minimum required flags to configure are:
* `-storageDataPath` - path to directory where VictoriaMetrics stores all the data.
2020-10-20 13:29:26 +02:00
* `-retentionPeriod` - data retention.
2019-11-30 19:36:10 +01:00
For instance:
`./victoria-metrics-prod -storageDataPath=/var/lib/victoria-metrics-data -retentionPeriod=3`
See [these instructions ](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/43 ) in order to configure VictoriaMetrics as OS service.
2020-12-11 20:08:13 +01:00
It is recommended setting up [VictoriaMetrics monitoring ](https://victoriametrics.github.io/Single-server-VictoriaMetrics.html#monitoring ).
2019-11-30 19:36:10 +01:00
2020-12-11 20:08:13 +01:00
3. Configure [vmagent ](https://victoriametrics.github.io/vmagent.html ) or Prometheus to write data to VictoriaMetrics.
2020-05-19 13:09:05 +02:00
It is recommended to use `vmagent` instead of Prometheus, since it is more resource efficient. If you still prefer Prometheus, then
2020-12-11 20:08:13 +01:00
see [these instructions ](https://victoriametrics.github.io/Single-server-VictoriaMetrics.html#prometheus-setup )
2020-05-19 13:09:05 +02:00
for details on how to configure Prometheus.
2019-11-30 19:36:10 +01:00
4. Configure Grafana to query VictoriaMetrics instead of Prometheus.
2020-12-11 20:08:13 +01:00
See [these instructions ](https://victoriametrics.github.io/Single-server-VictoriaMetrics.html#grafana-setup ).
2019-11-30 19:36:10 +01:00
There is also [cluster version ](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/cluster ) and [SaaS playground ](https://play.victoriametrics.com/signIn ).