Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/n0vad3v/registry-watch
Watch your Docker registry project size, then monitor it with Grafana.
https://github.com/n0vad3v/registry-watch
Last synced: 3 months ago
JSON representation
Watch your Docker registry project size, then monitor it with Grafana.
- Host: GitHub
- URL: https://github.com/n0vad3v/registry-watch
- Owner: n0vad3v
- Created: 2021-09-15T12:06:42.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-15T13:04:37.000Z (about 3 years ago)
- Last Synced: 2024-06-27T13:36:03.587Z (5 months ago)
- Language: Python
- Homepage:
- Size: 117 KB
- Stars: 31
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# registry-watch
> Watch your Docker registry project size, then monitor it with Grafana.
## Prerequisite
To use this tool, you will need:
* grafana
* influxdb
* python3 with influxdb lib installed## Usage
1. Install influxdb lib with `pip install influxdb`
2. Download `registry-watch.py` from this repo and edit L8-L11 to fit your InfluxDB configuration
3. Add this to your crontab, like this: `* * * * * python3 /path/to/registry-watch.py /path/to/data/registry/docker/registry/v2`
4. Configure Grafana to use this data
1. Set up Variables called `project_name` with query `SHOW TAG VALUES FROM WITH KEY = "project"`
![](./variables.png)
2. Set up panel with `SELECT mean("size") FROM "" WHERE ("project" =~ /^$project_name$/) AND $timeFilter GROUP BY time($__interval) fill(null)`, and make it repeat on `$project_name`## Demo
![](./demo.png)