How to purge / prevent using the prometheus local storage when using remote_write



  • I configured Prometheus to push metrics using remote_write but the local storage is still in use and keeps growing

    How could Prometheus be configured to stop storing locally and only push metrics or to minimize the retention policy from the local storage?



  • Prometheus can run in agent mode. In this mode it doesn't store data locally - it just sends the scraped samples to the configured remote storage systems. See https://prometheus.io/blog/2021/11/16/agent/ for details.

    P.S. see also the project I work on - https://docs.victoriametrics.com/vmagent.html - this is lightweight Prometheus-compatible agent, which understands Prometheus scrape configs. It usually requires lower amounts of memory and CPU comparing to Prometheus when scraping the same targets.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2