If you run Ubuntu, then just run
snap install victoriametricscommand in order to install and start VictoriaMetrics, then read these docs. Otherwise download the latest VictoriaMetrics release from releases page, from Docker hub or build it from sources.
This step isn’t needed if you run VictoriaMetrics via
snap install victoriametricsas described above. Otherwise run the binary or Docker image with the desired command-line flags. Pass
-helpin order to see description for all the available flags 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.
-retentionPeriod- data retention.
./victoria-metrics-prod -storageDataPath=/var/lib/victoria-metrics-data -retentionPeriod=3
Configure vmagent or Prometheus to write data to VictoriaMetrics. It is recommended to use
vmagentinstead of Prometheus, since it is more resource efficient. If you still prefer Prometheus, then see these instructions for details on how to configure Prometheus.
Configure Grafana to query VictoriaMetrics instead of Prometheus. See these instructions.