GithubHelp home page GithubHelp logo

cleafy / promqueen Goto Github PK

View Code? Open in Web Editor NEW
118.0 9.0 14.0 65 KB

prometheus offline data recorder and backfiller

License: Apache License 2.0

Go 89.68% Ruby 3.31% Dockerfile 3.13% Shell 3.88%
prometheus prometheus-metrics prometheus-utility prometheus-monitoring-solution recorder replayer golang go devops devops-tools

promqueen's People

Contributors

cravingpixels avatar lucamiorini avatar nicolopastore avatar parry84 avatar sessa93 avatar thypon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

promqueen's Issues

[Question] How to use promplay?

First of all, thank you for this app.

My goal

  1. Export data from Prometheus which runs on server X
  2. Import data to Prometheus which runs on server Y

How to replicate

  1. Server X runs Prometheus on port 9090, server Y on port 9091
  2. Export data with promrec (5s interval, 3 iterations)
    promrec --output="./data/metrics" -u service.name=http://localhost:9090/metrics -i 5s -n 3
    Output file is metrics
  3. Using vim to find and replace the port numbers from 9090 to 9091 in metrics file
    :%s/:9090/:9091/g
  4. Import to server Y This is where I'm having trouble, assuming I'm in a different directory
    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 ?

cannot find package "github.com/prometheus/prometheus/storage/local

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

Generated data layout and usage instructions

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.