cleafy / promqueen Goto Github PK
View Code? Open in Web Editor NEWprometheus offline data recorder and backfiller
License: Apache License 2.0
prometheus offline data recorder and backfiller
License: Apache License 2.0
Hi there,
I've been playing around with promrec and promfill after finding a reference on (prometheus/prometheus#535) but I'm struggling to get the tools working for me.
I notice that the directory and file layout that results from running promplay looks different than an empty Prometheus data store just created by bringing Prometheus up (I tried version 1.7.1 and 1.8.2).
After running Promplay:
[XXX@XXX data]$ tree
.
├── archived_fingerprint_to_metric
│ ├── 000002.log
│ ├── CURRENT
│ ├── LOCK
│ ├── LOG
│ └── MANIFEST-000003
├── archived_fingerprint_to_timerange
│ ├── 000002.log
│ ├── CURRENT
│ ├── LOCK
│ ├── LOG
│ └── MANIFEST-000003
├── DIRTY
├── heads.db
├── labelname_to_labelvalues
│ ├── 000001.log
│ ├── CURRENT
│ ├── LOCK
│ ├── LOG
│ └── MANIFEST-000000
├── labelpair_to_fingerprints
│ ├── 000001.log
│ ├── CURRENT
│ ├── LOCK
│ ├── LOG
│ └── MANIFEST-000000
└── VERSION
Fresh Prometheus installation
/prometheus/data # ls *
99:
6bf7c4f0744d30.db 81c763c5f4d943.db 8d67781712ca9b.db a0d965e6535daf.db b394c82595132c.db eb84fea15ae0a8.db f4b4c142823c09.db
9a:
54201d6ae73552.db 6806be24a5ce00.db
de:
0e7d051f319666.db f43a6192e1be9c.db
df:
02d74982a0fffa.db 10cbca521ed1cd.db 17a83d5b652ca7.db 5a507fbaf0dfc3.db a23eb2338abee9.db aaa3bb99297f27.db aaf0e130a90c18.db e4f026f3b83be1.db f8b3d8510ca802.db
It would be much appretiated if you could show an example of filling the database with random metrics (or give a description how to) and then show where to map the resulting data stores on an existing Prometheus installation.
First of all, thank you for this app.
My goal
How to replicate
promrec --output="./data/metrics" -u service.name=http://localhost:9090/metrics -i 5s -n 3
metrics
metrics
file
:%s/:9090/:9091/g
promplay --nopromcfg --dir=. --storage.path="data"
Output:
INFO[0000] Loading series map and head chunks... source="storage.go:373"
WARN[0000] Persistence layer appears dirty. source="persistence.go:815"
WARN[0000] Starting crash recovery. Prometheus is inoperational until complete. source="crashrecovery.go:40"
WARN[0000] To avoid crash recovery in the future, shut down Prometheus with SIGTERM or a HTTP POST to /-/quit. source="crashrecovery.go:41"
INFO[0000] Scanning files. source="crashrecovery.go:55"
INFO[0000] File scan complete. 0 series found. source="crashrecovery.go:83"
INFO[0000] Checking for series without series file. source="crashrecovery.go:85"
INFO[0000] Check for series without series file complete. source="crashrecovery.go:130"
INFO[0000] Cleaning up archive indexes. source="crashrecovery.go:402"
INFO[0000] Clean-up of archive indexes complete. source="crashrecovery.go:493"
INFO[0000] Rebuilding label indexes. source="crashrecovery.go:501"
INFO[0000] Indexing metrics in memory. source="crashrecovery.go:502"
INFO[0000] Indexing archived metrics. source="crashrecovery.go:510"
INFO[0000] All requests for rebuilding the label indexes queued. (Actual processing may lag behind.) source="crashrecovery.go:529"
WARN[0000] Crash recovery complete. source="crashrecovery.go:152"
INFO[0000] 0 series loaded. source="storage.go:378"
Frames processed: [-----------------------------------------------------------------------------------------------] 0s 100.00%
INFO[0000] Stopping local storage... source="storage.go:396"
INFO[0000] Stopping maintenance loop... source="storage.go:398"
INFO[0000] Maintenance loop stopped. source="storage.go:1259"
INFO[0000] Stopping series quarantining... source="storage.go:402"
INFO[0000] Series quarantining stopped. source="storage.go:1701"
INFO[0000] Stopping chunk eviction... source="storage.go:406"
INFO[0000] Chunk eviction stopped. source="storage.go:1079"
INFO[0000] Checkpointing in-memory metrics and chunks... source="persistence.go:612"
INFO[0000] Done checkpointing in-memory metrics and chunks in 9.896598ms. source="persistence.go:639"
INFO[0000] Checkpointing fingerprint mappings... source="persistence.go:1480"
INFO[0000] Done checkpointing fingerprint mappings in 4.744828ms. source="persistence.go:1503"
INFO[0000] Local storage stopped. source="storage.go:421"
Zero series were loaded, but I can still see the data
directory
data
├── VERSION
├── archived_fingerprint_to_metric
├── archived_fingerprint_to_timerange
├── heads.db
├── labelname_to_labelvalues
├── labelpair_to_fingerprints
└── mappings.db
How do I import this data to Prometheus? I thought that the below example should be the expected output, and then I should be able to copy the hashes to the proper Prometheus data folder.
data
├── 01E9WPHANY7DX13M80X3SM909T
├── 01E9ZHMENNSDYHPJRP0KG8G5SQ
├── 01E9ZHMHZJ1CSR8BV2AKD6KS17
├── 01E9ZPNFQRYE43VEZ60Z7ZVB31
├── lock
├── queries.active
├── snapshots
└── wal
May you please share the proper usage of this great tool ?
It should be possible to mask the credentials in the case we use http basic on http requests.
It would be nice to have a progress bar indicating the progress over the metrics files.
Have a look at:
https://github.com/cheggaaa/pb/tree/v2
Unfortunately I was not able to compile this with what is currently the storage layer for prometheus :-(.
$~/go/src/github.com/Cleafy/promqueen/bin/promplay$ go build
main.go:22:2: cannot find package "github.com/prometheus/prometheus/storage/local" ...
Are there any plans to get this project running again or am I just doing it wrong?
hello, i am getting error message when use go get for brand new install. should I revert back to some historical version of prometheus, or i miss sth. (sorry very new to golang)
$ go get github.com/Cleafy/promqueen/bin/promplay
package github.com/prometheus/prometheus/storage/local: cannot find package "github.com/prometheus/prometheus/storage/local"
checking prometheus storage folder i do not see any file as "local*" too.
my platform ubuntu 16.04.3 LTS x86_64, i try both go version 1.6 (ubuntu apt repository), and go1.9.1.
thanks
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.