Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MacroPower/grafana-image-renderer-sdk-go
Go bindings & CLI for Grafana Image Renderer
https://github.com/MacroPower/grafana-image-renderer-sdk-go
grafana grafana-image-renderer
Last synced: about 2 months ago
JSON representation
Go bindings & CLI for Grafana Image Renderer
- Host: GitHub
- URL: https://github.com/MacroPower/grafana-image-renderer-sdk-go
- Owner: MacroPower
- License: apache-2.0
- Created: 2021-06-12T22:24:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-06T04:19:44.000Z (over 3 years ago)
- Last Synced: 2024-11-02T07:14:08.115Z (about 2 months ago)
- Topics: grafana, grafana-image-renderer
- Language: Go
- Homepage:
- Size: 2.29 MB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grafana-image-renderer-sdk-go
> This package is in early alpha. Please use with caution.
This package can be used to interact with the [Grafana Image Renderer](https://github.com/grafana/grafana-image-renderer) from Go applications.
It also includes:
- a sequencer package to make rendering sets of images easier
- a CLI for both image and sequence renderingThis package contains code & general language from [grafana-tools/sdk](https://github.com/grafana-tools/sdk).
## CLI
Install with:
```text
go get -u github.com/MacroPower/grafana-image-renderer-sdk-go/cmd/grafana-image-renderer-cli
```The CLI contains two subcommands, `image` for single renders, and `sequence` for consecutive renders.
```text
$ grafana-image-renderer-cli image --helpUsage of image:
-api-key-or-basic-auth string
Grafana authorization, either an API key or basic auth
-api-url string
Grafana API URL
-dashboard string
ID of the dashboard
-end-time int
The ending timestamp (Unix MS) of the render
-height int
The height of the image (default 1080)
-out-file string
The file to write (default "img.png")
-panel int
ID of the panel, 0 = Entire dashboard
-start-time int
The starting timestamp (Unix MS) of the render
-timeout duration
Timeout of the render request (default 1m0s)
-width int
The width of the image (default 1920)
``````text
$ grafana-image-renderer-cli sequence --helpUsage of sequence:
-api-key-or-basic-auth string
Grafana authorization, either an API key or basic auth
-api-url string
Grafana API URL
-dashboard string
ID of the dashboard
-end-padding duration
Duration to add to the end of the frame
-frame-interval duration
Time progression between frames, positive = forward, negative = backward (default 5m0s)
-frames string
The frames to render, pass a range and/or a set (e.g. 1-10,12,15) (default "1-2")
-height int
The height of the image (default 1080)
-max-concurrency int
Maximum number of concurrent render requests (default 5)
-out-directory string
Directory to write rendered frames to (default "frames")
-panel int
ID of the panel, 0 = Entire dashboard
-start-padding duration
Duration to add to the start of the frame
-start-time int
The starting timestamp (Unix MS) of the render
-timeout duration
Timeout of the render request (default 1m0s)
-width int
The width of the image (default 1920)
-worker-delay duration
Delay worker startup (default 2s)
```