Prometheus: Deleting data from Prometheus

This documentation is part of the Introduction guide. You can view the complete guide here: How Prometheus works.

👋 Welcome to the Stackhero documentation!

Stackhero offers a ready-to-use Prometheus cloud solution that provides numerous benefits, including:

  • Alert Manager included to send alerts to Slack, Mattermost, PagerDuty, etc.
  • Dedicated email server to send unlimited email alerts.
  • Blackbox to probe HTTP, ICMP, TCP, and more.
  • Easy configuration with an online configuration file editor.
  • Effortless updates with just a click.
  • Optimal performance and robust security powered by a private and dedicated VM.

Save time and simplify your life: it only takes 5 minutes to try Stackhero's Prometheus cloud hosting solution!

If you need to remove specific time-series data recorded in Prometheus, you can utilise the admin API. For example, to delete data associated with a job named oldJob, you could use the following command:

curl -u admin -X POST -g 'https://<yourServiceDomain>/api/v1/admin/tsdb/delete_series?match[]={job="oldJob"}'

Once data is deleted, it cannot be recovered. Ensure you have comprehensive backups and proceed cautiously when performing such actions.

For additional information, refer to the official Prometheus documentation.