Giter Club home page Giter Club logo

community.grafana's Introduction

Grafana Collection for Ansible

Codecov

All Contributors

This repo hosts the community.grafana Ansible Collection.

The collection includes a variety of Ansible content to help automate the management of resources in Grafana.

Included content

Click on the name of a plugin or module to view that content's documentation:

Supported Grafana versions

We aim at keeping the last 3 minor versions (at least) of Grafana tested. This collection is currently testing the modules against Grafana versions 6.7.4, 7.0.6, and 7.1.3.

Installation and Usage

Installing the Collection from Ansible Galaxy

Before using the Grafana collection, you need to install it with the Ansible Galaxy CLI:

ansible-galaxy collection install community.grafana

You can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: community.grafana
    version: 1.0.0

Using modules from the Grafana Collection in your playbooks

You can either call modules by their Fully Qualified Collection Namespace (FQCN), like community.grafana.grafana_datasource, or you can call modules by their short name if you list the community.grafana collection in the playbook's collections, like so:

---
- hosts: localhost
  gather_facts: false
  connection: local

  collections:
    - community.grafana

  tasks:
    - name: Ensure Influxdb datasource exists.
      grafana_datasource:
        name: "datasource-influxdb"
        grafana_url: "https://grafana.company.com"
        grafana_user: "admin"
        grafana_password: "xxxxxx"
        org_id: "1"
        ds_type: "influxdb"
        ds_url: "https://influx.company.com:8086"
        database: "telegraf"
        time_interval: ">10s"
        tls_ca_cert: "/etc/ssl/certs/ca.pem"

For documentation on how to use individual modules and other content included in this collection, please see the links in the 'Included content' section earlier in this README.

Testing and Development

If you want to develop new content for this collection or improve what's already here, the easiest way to work on the collection is to clone it into one of the configured COLLECTIONS_PATHS, and work on it there.

Testing with ansible-test

The tests directory contains configuration for running sanity and integration tests using ansible-test.

You can run the collection's test suites with the commands:

ansible-test sanity --docker -v --color
ansible-test integration --docker -v --color

Publishing New Versions

The current process for publishing new versions of the Grafana Collection is manual, and requires a user who has access to the community.grafana namespace on Ansible Galaxy to publish the build artifact.

  1. Ensure CHANGELOG.md contains all the latest changes.

  2. Update galaxy.yml and this README's requirements.yml example with the new version for the collection.

  3. Tag the version in Git and push to GitHub.

  4. Run the following commands to build and release the new version on Galaxy:

    ansible-galaxy collection build
    ansible-galaxy collection publish ./community-grafana-$VERSION_HERE.tar.gz
    

After the version is published, verify it exists on the Grafana Collection Galaxy page.

Changelogs

  • Every change that does not only affect docs or tests must have a changelog fragment.
    • Exception: fixing/extending a feature that already has a changelog fragment and has not yet been released. Such PRs must always link to the original PR(s) they update.
    • Use your common sense!
    • (This might change later. The trivial category should then be used to document changes which are not important enough to end up in the text version of the changelog.)
    • Fragments must not be added for new module PRs and new plugin PRs. The only exception are test and filter plugins: these are not automatically documented yet.
  • The (x+1).0.0 changelog continues the x.0.0 changelog.
    • A x.y.0 changelog with y > 0 is not part of a changelog of a later X.. (with X > x) or x,Y,* (with Y > y) release.
    • A x.y.z changelog with z > 0 is not part of a changelog of a later (x+1).. or x.Y.z (with Y > y) release. Since everything adding to the minor/patch changelogs are backports, the same changelog fragments of these minor/patch releases will be in the next major release's changelog. (This is the same behavior as in ansible/ansible.)
  • Changelogs do not contain previous major releases, and only use the ancestor feature (in changelogs/changelog.yaml) to point to the previous major release.
  • Changelog fragments are removed after a release is made.

See antsibull-changelog documentation

More Information

For more information about Ansible's Grafana integration, join the #ansible-community channel on Freenode IRC, and browse the resources in the Grafana Working Group Community wiki page.

License

GNU General Public License v3.0 or later

See LICENCE to see the full text.

Contributing

Any contribution is welcome and we only ask contributors to:

  • Provide at least integration tests for any contribution.
  • Create an issues for any significant contribution that would change a large portion of the code base.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


John R Barker

πŸš‡ ⚠️ πŸ’»

RΓ©mi REY

⚠️ πŸ“–

Thierry SallΓ©

πŸ’» ⚠️

Antoine

πŸ’» ⚠️

hvle

πŸ’» ⚠️

jual

πŸ’» ⚠️

MCyprien

πŸ’» ⚠️

Markus Fischbacher

πŸ’»

Remi Verchere

πŸ’»

Abhijeet Kasurde

πŸ“– ⚠️

martinwangjian

πŸ’»

cwollinger

πŸ’»

Andrew Klychkov

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

community.grafana's People

Contributors

akasurde avatar allcontributors[bot] avatar andersson007 avatar cwollinger avatar fegalo avatar geerlingguy avatar gundalow avatar pomverte avatar rbnis avatar rockaut avatar rrey avatar seuf avatar

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.