Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/squiddy/gitlab-deployment-annotations
Provides a grafana datasource to get annotations for each deployment in gitlab.
https://github.com/squiddy/gitlab-deployment-annotations
gitlab grafana grafana-annotations
Last synced: 24 days ago
JSON representation
Provides a grafana datasource to get annotations for each deployment in gitlab.
- Host: GitHub
- URL: https://github.com/squiddy/gitlab-deployment-annotations
- Owner: squiddy
- License: mit
- Created: 2020-02-19T18:19:45.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T23:57:11.000Z (almost 2 years ago)
- Last Synced: 2024-11-16T14:09:13.757Z (about 1 month ago)
- Topics: gitlab, grafana, grafana-annotations
- Language: Go
- Size: 87.9 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Annotations for grafana from gitlab deployments
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![Go](https://github.com/squiddy/gitlab-deployment-annotations/workflows/Go/badge.svg)Provides a grafana datasource to get annotations for each deployment in
gitlab. Useful to see whether code you deployed had any impact.![Screenshot](extra/screenshot.png)
## Usage
```shell
$ go build
$ export GITLAB_URL=https://gitlab.example.com
$ export GITLAB_TOKEN=apitoken
$ export HTTP_ADDRESS=:8080
$ ./gitlab-deployment-annotations
```Log into grafana (`http://localhost:3000`) and add a SimpleJSON datasource
and point it to your datasource, e.g. ``http://localhost:8080``Add annotations to a dashboard using your datasource and configure the query
(which accepts JSON), which allows you to select the project you want to
display, for example:```json
{"project_id": 16, "environment": "Live"}
```## Development
1. Build a grafana container image with the simple-json-datasource plugin
preinstalled using this Dockerfile:```Dockerfile
FROM grafana/grafana
RUN grafana-cli --pluginsDir "$GF_PATHS_PLUGINS" plugins install grafana-simple-json-datasource
````$ docker build -t gf .`
2. Run a local instance of grafana
`$ docker run --net host gf`
3. Run and configure the datasource (see usage)