jorinvo / prometheus-pushgateway-cleaner Goto Github PK
View Code? Open in Web Editor NEWDelete old metric jobs from Prometheus pushgateway
License: MIT License
Delete old metric jobs from Prometheus pushgateway
License: MIT License
Hello,
Thank you for this project! Having an issue with base64 encoding...
Deleting job: http://mon-prometheus-operator-prometheus-pushgateway.mon.svc.cluster.local:9091/metrics/job@base64/ZHAtZW1xeC05NWJiNjhmZGItZmY4ZGc=/instance@base64/ZHAtZW1xeC05NWJiNjhmZGItZmY4ZGd+MTkyLjE2OC4xNi44
Exception in thread "main" clojure.lang.ExceptionInfo: clj-http: status 400 {:headers {"content-type" "text/plain; charset=utf-8", "x-content-type-options" "nosniff", "date" "Mon, 22 Jun 2020 22:25:05 GMT", "content-length" "132"}, :status 400, :body "invalid base64 encoding for label instance="ZHAtZW1xeC05NWJiNjhmZGItZmY4ZGd+MTkyLjE2OC4xNi44": illegal base64 data at input byte 31\n"}
I believe the base64 encoding type that push gateway expects is different, possibly URL encoding instead of basic base64 encoding? Specifically it does not like "+".
Can be based on git tag/commit
It seems to have the wrong metric name
Dry run: Won't delete any data
Fetching data from Prometheus pushgateway
Found jobs: 9
Expired jobs: 9
(Dry run) Deletion of job: http://10.0.1.2:9091/metrics/job@base64/amFuaXRvcg
(Dry run) Deletion of job: http://10.0.1.2:9091/metrics/job@base64/dHJhY2tjZXJ0cw/domain@base64/YXBwLmVka2ltby5jb20
Which also prevents it from deleting the metric.
Deleting job: http://10.0.1.2:9091/metrics/job@base64/amFuaXRvcg
Exception in thread "main" clojure.lang.ExceptionInfo: clj-http: status 404 {:headers {"content-type" "text/plain; charset=utf-8", "x-content-type-options" "nosniff", "date" "Tue, 07 Sep 2021 20:47:56 GMT", "content-length" "19"}, :status 404, :body "404 page not found\n"}
What am I missing?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.