pushgateway-cleaner

command module
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 10 Imported by: 0

README

pushgateway-cleaner

license release GitHub release date

Do you have a Prometheus pushgateway? Were you also surprised by the fact that pushgateway metrics will never be deleted? That's what this project is for.

This application will use the built-in push_time_seconds metric that pushgateway keeps track of, and will delete metric groups that have been around longer than you specify.

Configuration

These are the available flags for pushgateway-cleaner

⇒ ./pushgateway-cleaner --help
Usage of ./pushgateway-cleaner:
  -pushgateway-url string
        Pushgateway URL (default "http://localhost:9091")
  -sync-period duration
        How often to check for old metrics (default 3m0s)
  -ttl duration
        How old metrics are allowed to be before being deleted (default 10m0s)
  -verbose
        Set logging verbosity level to debug

Usage

We recommend running this as a sidecar container next to your pushgateway deployment. For example, here's an addition to the prometheus-community/prometheus-pushgateway helm chart.

extraContainers:
  - name: pushgateway-cleaner
    args:
      - --verbose
    image: ghcr.io/abatilo/pushgateway-cleaner:latest
    resources:
        requests:
          cpu: 20m
          memory: 4Mi
        limits:
          memory: 16Mi

Installation

Docker containers are built for both linux/amd64 and linux/arm64. Check out available versions here

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL