/prom-porter

Dump and load Prometheus data

Primary LanguageGo

Prometheus Porter

Dump a time range data from Prometheus and load to another Prometheus for query.

Architecture

+------------------+  write   +---------------+  dump   +-----------+
| User Prometheus  | -------> | Write Storage | ------> | Dump Data |
+------------------+          +---------------+         +-----------+
                                                          |
                                                          |
                                                          |
                                                          |
+------------------+  read    +---------------+  load     |
| Local Prometheus | -------> | Read Storage  | <---------+
+------------------+          +---------------+           

Usage

Write

  1. Add the following configurtion to the Prometheus server
remote_write:
  - url: "http://localhost:1234/write"
  1. Start write server.
  2. To dump data, run curl http://localhost:1234/dump

Read

  1. Add the following configuration to another Prometheus server
remote_read:
  - url: "http://localhost:1235/read"
  1. Start read server with the dump data
  2. Access the Prometheus web for query

Reference

TODO

  • Support porting TiDB metrics and showing them on Grafana.