Skip to content

Clean metrics with defined TTL from Prometheus push-gateway

License

Notifications You must be signed in to change notification settings

PayU/pushgateway-cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Clean metrics with defined TTL from Prometheus push-gateway

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published