#!/bin/bash
# License   :   Apache-2.0 @ https://pigsty.io/docs/about/license/
# Copyright :   2018-2026  Ruohang Feng / Vonng (rh@vonng.com)
# Destroy VictoriaMetrics data and create a new one

echo "destroy vmetrics data and create a new one"
systemctl stop vmetrics vmalert
rm -rf /infra/metrics/*
systemctl start vmetrics vmalert

echo "vmetrics recreated"
systemctl status vmetrics