Pro.Monitor Cockpit
User Guide
Support
User Guide
Support
victoria-metrics-linux-amd64-vx.yy.zz.tar.gz
mkdir /YOUR_FOLDER/victoriametrics nano /etc/systemd/system/victoriametrics.service
Content victoriametrics.service file :
[Unit] Description=Victoria Metrics After=network.target [Service] Type=simple StartLimitBurst=5 StartLimitInterval=0 Restart=on-failure RestartSec=1 PIDFile=/YOUR_FOLDER/victoriametrics/victoriametrics.pid ExecStart=/usr/local/bin/victoriametrics -storageDataPath /YOUR_FOLDER/victoriametrics-data -retentionPeriod 6 -graphiteListenAddr=:2003 -dedup.minScrapeInterval=1ms ExecStop=/bin/kill -s SIGTERM $MAINPID [Install] WantedBy=multi-user.target
chmod 755 /etc/systemd/system/victoriametrics.service mkdir /etc/systemd/system/victoriametrics.service.d nano /etc/systemd/system/victoriametrics.service.d/ulimit.conf
Create the file ulimit.conf with following content :
[Service] LimitNOFILE=32000 LimitNPROC=32000
wget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v1.56.0/victoria-metrics-amd64-v1.56.0.tar.gz tar -zxvf victoria-metrics-amd64-v1.56.0.tar.gz cp -R victoria-metrics-prod /usr/local/bin/victoriametrics systemctl enable victoriametrics firewall-cmd --zone=public --add-port=2003/tcp --permanent firewall-cmd --reload systemctl start victoriametrics
wget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v1.77.2/vmutils-amd64-v1.77.2.tar.gz tar -zxvf vmutils-amd64-v1.77.2.tar.gz
#!/bin/sh vmbackup-prod -storageDataPath=[VM_DATA_FOLDER] -snapshot.createURL=http://localhost:8428/snapshot/create -dst=fs://[VM_BACKUP_FOLDER]
chmod 700 do_vm_backup.sh
crontab -e 0 */1 * * * /[PATH_TO_SCRIPT]/do_vm_backup.sh
vmrestore
utility:systemctl stop victoriametrics vmrestore-prod -src=fs:///[PATH_TO_BACKUPS] -storageDataPath=[VM_DATA_FOLDER] systemctl start victoriametrics