2019-12-02 20:06:39 +00:00
# Quick Start
2020-11-18 17:44:40 +00: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 07:23:08 +00:00
from [Docker hub ](https://hub.docker.com/r/victoriametrics/victoria-metrics/ )
2020-12-11 19:08:13 +00:00
or [build it from sources ](https://victoriametrics.github.io/Single-server-VictoriaMetrics.html#how-to-build-from-sources ).
2019-11-30 18:36:10 +00:00
2020-11-18 17:44:40 +00: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 18:36:10 +00: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 11:29:26 +00:00
* `-retentionPeriod` - data retention.
2019-11-30 18:36:10 +00: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 19:08:13 +00:00
It is recommended setting up [VictoriaMetrics monitoring ](https://victoriametrics.github.io/Single-server-VictoriaMetrics.html#monitoring ).
2019-11-30 18:36:10 +00:00
2020-12-11 19:08:13 +00:00
3. Configure [vmagent ](https://victoriametrics.github.io/vmagent.html ) or Prometheus to write data to VictoriaMetrics.
2020-05-19 11:09:05 +00: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 19:08:13 +00:00
see [these instructions ](https://victoriametrics.github.io/Single-server-VictoriaMetrics.html#prometheus-setup )
2020-05-19 11:09:05 +00:00
for details on how to configure Prometheus.
2019-11-30 18:36:10 +00:00
4. Configure Grafana to query VictoriaMetrics instead of Prometheus.
2020-12-11 19:08:13 +00:00
See [these instructions ](https://victoriametrics.github.io/Single-server-VictoriaMetrics.html#grafana-setup ).
2019-11-30 18:36:10 +00:00
There is also [cluster version ](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/cluster ) and [SaaS playground ](https://play.victoriametrics.com/signIn ).