Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tomtom-international/grafana-inviter

Script and module to send Grafana invites to users obtained from LDAP
https://github.com/tomtom-international/grafana-inviter

grafana invite invite-users ldap

Last synced: about 1 month ago
JSON representation

Script and module to send Grafana invites to users obtained from LDAP

Awesome Lists containing this project

README

        

# grafana-inviter

[![Azure DevOps builds](https://img.shields.io/azure-devops/build/tomtomweb/GitHub-TomTom-International/14/master.svg)](https://dev.azure.com/tomtomweb/GitHub-TomTom-International/_build/latest?definitionId=14&branchName=master)
[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/tomtomweb/GitHub-TomTom-International/14/master.svg)](https://dev.azure.com/tomtomweb/GitHub-TomTom-International/_build/latest?definitionId=14&branchName=master)
[![Azure DevOps coverage](https://img.shields.io/azure-devops/coverage/tomtomweb/GitHub-TomTom-International/14/master.svg)](https://dev.azure.com/tomtomweb/GitHub-TomTom-International/_build/latest?definitionId=14&branchName=master)

[![PyPI - Version](https://img.shields.io/pypi/v/grafana-inviter.svg)](https://pypi.org/project/grafana-inviter/)
[![PyPI - License](https://img.shields.io/pypi/l/grafana-inviter.svg)](https://pypi.org/project/grafana-inviter/)
[![PyPI - Python Versions](https://img.shields.io/pypi/pyversions/grafana-inviter.svg)](https://pypi.org/project/grafana-inviter/)
[![PyPI - Format](https://img.shields.io/pypi/format/grafana-inviter.svg)](https://pypi.org/project/grafana-inviter/)
[![PyPI - Status](https://img.shields.io/pypi/status/grafana-inviter.svg)](https://pypi.org/project/grafana-inviter/)
[![PyUp - Updates](https://pyup.io/repos/github/tomtom-international/grafana-inviter/shield.svg)](https://pyup.io/repos/github/tomtom-international/grafana-inviter/)

Inviting people to join a Grafana organization is usually done from the Grafana UI. For smaller groups this might be easy but for a larger set of people one
rather would like to not fiddle around in the UI and instead do it in an automated fashion.

This tool is intended to send invites to join a new Grafana organization to people obtained from LDAP.

## Features

* Fetch users from LDAP and generate Grafana invites links
* Send invite links to users

## Quickstart

```bash
pip install grafana-inviter
```

* Copy the *example_config.json* configuration and adjust it to your needs
* Generate a Grafana API token with admin privileges (*https:///org/apikeys*)
* Ensure you have a LDAP service account user for searches created

```bash
grafana-inviter --grafana-token "" --ldap-user --config config.json --ask-ldap-password
LDAP password:
Sending invite to John Doe (John [email protected])
{'name': 'John Doe', 'loginOrEmail': '[email protected]', 'role': 'Viewer', 'sendEmail': False, 'orgId': 10}
> User [email protected] is already added to organization
Sending invite to Jane Doe ([email protected])
{'name': 'Jane Doe', 'loginOrEmail': '[email protected]', 'role': 'Viewer', 'sendEmail': False, 'orgId': 10}
> Created invite for [email protected]

Available invite URLs: ['https:///invite/Vv4Q8SYVyk7ULGpeWvjMXl0iuWLl67']
```

## Credits

This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [tomtom-international/cookiecutter-python](https://github.com/tomtom-international/cookiecutter-python) project template.