https://github.com/be9/promethize
Insert seed data into Prometheus database
https://github.com/be9/promethize
golang prometheus prometheus-metrics
Last synced: 7 months ago
JSON representation
Insert seed data into Prometheus database
- Host: GitHub
- URL: https://github.com/be9/promethize
- Owner: be9
- License: apache-2.0
- Created: 2018-11-26T07:42:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-27T10:05:56.000Z (over 7 years ago)
- Last Synced: 2024-06-20T16:33:02.898Z (about 2 years ago)
- Topics: golang, prometheus, prometheus-metrics
- Language: Go
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# promethize
Insert seed data into Prometheus database.
## Setup/build
```bash
$ dep ensure
$ go build
$ go install
```
## Import data
Prepare data in Prometheus scrape format (`datafile.txt`):
```
# TYPE xyz counter
xyz{label1="one",label2="aaa"} 100 1543252259148
xyz{label1="one",label2="bbb"} 200 1543252259148
xyz{label1="one",label2="aaa"} 150 1543252319148
xyz{label1="one",label2="bbb"} 250 1543252319148
...
```
```bash
# Initialize a database
$ promethize init /path/to/prometheus/database
# Load data to the database
$ promethize load /path/to/prometheus/database datafile.txt
```
## Notes
1. Only counter metrics were tested.
2. Running multiple successive `load` commands was not tested.