If you run Ubuntu please run the
snap install victoriametricscommand to install and start VictoriaMetrics. Then read these docs. Otherwise you can download the latest VictoriaMetrics release from releases page, or Docker hub or build it from sources.
This step isn’t needed if you run VictoriaMetrics via
snap install victoriametricsas described above. Otherwise, please run the binary or Docker image with your desired command-line flags. You can look at
-helpto see descriptions of all available flags and their default values. The default flag values should fit the majority of cases. The minimum required flags that must be configured are:
-storageDataPath- the path to directory where VictoriaMetrics stores your data.
-retentionPeriod- data retention.
./victoria-metrics-prod -storageDataPath=/var/lib/victoria-metrics-data -retentionPeriod=3
Configure either vmagent or Prometheus to write data to VictoriaMetrics. We recommended using
vmagentinstead of Prometheus because it is more resource efficient. If you still prefer Prometheus see these instructions for details on how it may be properly configured.
To configure Grafana to query VictoriaMetrics instead of Prometheus please see these instructions.