Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The reason you need a copy of the prometheus systemd script is because it determines the database storage location as well as the data retention policy of the customer ( default its 15 days )

Note

If you are just setting up another SwarmTelemetry VM to visualize the data, make sure to set the retention time to 365 days, otherwise Prometheus will delete it within 15 days by default.

--storage.tsdb.path=/var/lib/prometheus/data

...

Code Block
systemctl stop prometheus
# You dont need the old metrics data
rm -rf /var/lib/prometheus 
cd /
tar xvzf prometheus-state-ddmmyyyy.tgz
chown -R prometheus. /var/lib/prometheus
systemctl daemon-reload
prometheus
systemctl start prometheus

Verify that prometheus started without critical errors, you should see a message “Server is ready to receive web requests”

Panel
bgColor#EAE6FF

journalctl -xe -t prometheus

If you now access grafana you should see the old metrics on the dashboards, you will have to change the date range since it will be somewhere in the past. I would set the range to 30days first then use the mouse to select the start and end of the data in one of the historical charts so that your date range ends up specifying exactly where in time the data is. Example

...