OpenMetricMigrator is a tool designed to migrate and transform OpenMetrics data efficiently. It simplifies the process of converting metric formats and moving data between monitoring systems.
- Convert OpenMetrics data to various formats
- Seamlessly migrate metrics between monitoring platforms
- Easy configuration with minimal setup
- High performance and scalable
To install OpenMetricMigrator, clone the repository and build the project:
# Clone the repository
git clone https://github.com/WoodProgrammer/OpenMetricMigrator.git
cd OpenMetricMigrator
go build -o opm .
mv opm /usr/local/binAlternatively, you can install it using Go:
go install github.com/WoodProgrammer/OpenMetricMigrator@latestRun the tool with the required options:
./openmetricmigrator --input input-file.prom --output output-file.prom --targetdir target-dirCLI tool to export Prometheus data in OpenMetrics format
Usage:
  openmetricmigrator [flags]
Flags:
  -d, --directory string    Data directory to export (default "data")
  -e, --end string          End timestamp (epoch) (default "0")
  -h, --help                help for openmetricmigrator
  -H, --host string         Prometheus host (default "localhost")
  -m, --metrictype string   Type of metrics like counter|gauge (default "counter")
  -P, --port string         Prometheus port (default "9090")
  -q, --query string        PromQL query
  -s, --start string        Start timestamp (epoch) (default "0")
  -t, --step string         Query step (default "15s")
  -T, --targetdir string    Target prometheus data directory
Convert an OpenMetrics file to a Prometheus-compatible format:
./openmetricmigrator -H localhost -P 9090 -s 1741484483 -e 1741488083 -q 'up{job="prometheus"}'Contributions are welcome! Feel free to submit issues or pull requests to improve the tool.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or feedback, feel free to open an issue on GitHub.
## TO DO ;
- Adjustable command args
- Enrich configuration details
- E2E Automated tests for per release
