https://github.com/payu/pushgateway-cleaner
Clean metrics with defined TTL from Prometheus push-gateway
https://github.com/payu/pushgateway-cleaner
prometheus pushgateway
Last synced: 12 months ago
JSON representation
Clean metrics with defined TTL from Prometheus push-gateway
- Host: GitHub
- URL: https://github.com/payu/pushgateway-cleaner
- Owner: PayU
- License: apache-2.0
- Created: 2020-11-18T09:05:30.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-06-02T20:31:34.000Z (about 3 years ago)
- Last Synced: 2025-05-16T22:14:06.433Z (about 1 year ago)
- Topics: prometheus, pushgateway
- Language: JavaScript
- Homepage:
- Size: 155 KB
- Stars: 5
- Watchers: 6
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pushgateway Cleaner
This project purpose is to clean old metrics from Prometheus pushgateway.
It works as job and not a service, which means that after cleanup the process will die.
## Environment variables
| Variable | Description | Examples |
| ----------------------------- | - | - |
| PUSHGATEWAY_URL | the PushGateway endpoint (url + port) | http://100.10.102.23:9091 |
| TTL_HOURS | metrics created during this time will not be removed | 24 |
| SLACK_WEBHOOK_URL | optional slack webhook url to send notification upon successful cleanup | |
## Starting local
```npm install```
```PUSHGATEWAY_URL=http://localhost:9091 TTL_HOURS=24 npm run start```
## Running tests
| Type | Command |
| - | - |
| Integration Tests | PUSHGATEWAY_URL=http://localhost:9091 TTL_HOURS=24 npm run test |