Coder Social home page Coder Social logo

tomtom-international / grafana-inviter Goto Github PK

View Code? Open in Web Editor NEW
1.0 7.0 3.0 52 KB

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

License: Apache License 2.0

Python 93.36% Makefile 6.64%
grafana ldap invite invite-users

grafana-inviter's Introduction

grafana-inviter

Azure DevOps builds Azure DevOps tests Azure DevOps coverage

PyPI - Version PyPI - License PyPI - Python Versions PyPI - Format PyPI - Status PyUp - Updates

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

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://<YOUR_GRAFANA_URL>/org/apikeys)
  • Ensure you have a LDAP service account user for searches created
grafana-inviter --grafana-token "<YOUR_GF_TOKEN_WITH>" --ldap-user <YOUR_SVC_ACCOUNT_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://<YOUR_GRAFANA_URL>/invite/Vv4Q8SYVyk7ULGpeWvjMXl0iuWLl67']

Credits

This package was created with Cookiecutter and the tomtom-international/cookiecutter-python project template.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.