Library for building Grafana dashboards
Project description
===============================
Getting Started with grafanalib
===============================
.. image:: https://readthedocs.org/projects/grafanalib/badge/?version=latest
:alt: Documentation Status
:scale: 100%
:target: https://grafanalib.readthedocs.io/en/latest/?badge=latest
Do you like `Grafana <http://grafana.org/>`_ but wish you could version your
dashboard configuration? Do you find yourself repeating common patterns? If
so, grafanalib is for you.
grafanalib lets you generate Grafana dashboards from simple Python scripts.
How it works
============
Take a look at `the examples directory
<https://github.com/weaveworks/grafanalib/blob/main/grafanalib/tests/examples/>`_,
e.g. `this dashboard
<https://github.com/weaveworks/grafanalib/blob/main/grafanalib/tests/examples/example.dashboard.py>`_
will configure a dashboard with a single row, with one QPS graph broken down
by status code and another latency graph showing median and 99th percentile
latency.
In the code is a fair bit of repetition here, but once you figure out what
works for your needs, you can factor that out.
See `our Weave-specific customizations
<https://github.com/weaveworks/grafanalib/blob/main/grafanalib/weave.py>`_
for inspiration.
You can read the entire grafanlib documentation on `readthedocs.io
<https://grafanalib.readthedocs.io/>`_.
Getting started
===============
grafanalib is just a Python package, so:
.. code-block:: console
$ pip install grafanalib
Generate the JSON dashboard like so:
.. code-block:: console
$ curl -o example.dashboard.py https://raw.githubusercontent.com/weaveworks/grafanalib/main/grafanalib/tests/examples/example.dashboard.py
$ generate-dashboard -o frontend.json example.dashboard.py
Support
=======
This library is in its very early stages. We'll probably make changes that
break backwards compatibility, although we'll try hard not to.
grafanalib works with Python 3.6 through 3.9.
Developing
==========
If you're working on the project, and need to build from source, it's done as follows:
.. code-block:: console
$ virtualenv .env
$ . ./.env/bin/activate
$ pip install -e .
Configuring Grafana Datasources
===============================
This repo used to contain a program ``gfdatasource`` for configuring
Grafana data sources, but it has been retired since Grafana now has a
built-in way to do it. See https://grafana.com/docs/administration/provisioning/#datasources
Community
=========
We'd like you to join the ``grafanalib`` community! Talk to us on Slack (see the links),
or join us for one of our next meetings):
- Meetings take place monthly: third Friday of the month 15:00 UTC
- https://weaveworks.zoom.us/j/96824669060
- `Meeting minutes and agenda
<https://docs.google.com/document/d/1JxrSszyPHYhNbJDWYZehRKv6AO4U-zIBhuNmYQVOIHo/edit>`_
(includes links to meeting recordings)
We follow the `CNCF Code of Conduct </docs/CODE_OF_CONDUCT.rst>`_.
Getting Help
------------
If you have any questions about, feedback for or problems with ``grafanalib``:
- Read the documentation at https://grafanalib.readthedocs.io
- Invite yourself to the `Weave Users Slack <https://slack.weave.works/>`_.
- Ask a question on the `#grafanalib <https://weave-community.slack.com/messages/grafanalib/>`_ slack channel.
- `File an issue <https://github.com/weaveworks/grafanalib/issues/new>`_.
Your feedback is always welcome!
Getting Started with grafanalib
===============================
.. image:: https://readthedocs.org/projects/grafanalib/badge/?version=latest
:alt: Documentation Status
:scale: 100%
:target: https://grafanalib.readthedocs.io/en/latest/?badge=latest
Do you like `Grafana <http://grafana.org/>`_ but wish you could version your
dashboard configuration? Do you find yourself repeating common patterns? If
so, grafanalib is for you.
grafanalib lets you generate Grafana dashboards from simple Python scripts.
How it works
============
Take a look at `the examples directory
<https://github.com/weaveworks/grafanalib/blob/main/grafanalib/tests/examples/>`_,
e.g. `this dashboard
<https://github.com/weaveworks/grafanalib/blob/main/grafanalib/tests/examples/example.dashboard.py>`_
will configure a dashboard with a single row, with one QPS graph broken down
by status code and another latency graph showing median and 99th percentile
latency.
In the code is a fair bit of repetition here, but once you figure out what
works for your needs, you can factor that out.
See `our Weave-specific customizations
<https://github.com/weaveworks/grafanalib/blob/main/grafanalib/weave.py>`_
for inspiration.
You can read the entire grafanlib documentation on `readthedocs.io
<https://grafanalib.readthedocs.io/>`_.
Getting started
===============
grafanalib is just a Python package, so:
.. code-block:: console
$ pip install grafanalib
Generate the JSON dashboard like so:
.. code-block:: console
$ curl -o example.dashboard.py https://raw.githubusercontent.com/weaveworks/grafanalib/main/grafanalib/tests/examples/example.dashboard.py
$ generate-dashboard -o frontend.json example.dashboard.py
Support
=======
This library is in its very early stages. We'll probably make changes that
break backwards compatibility, although we'll try hard not to.
grafanalib works with Python 3.6 through 3.9.
Developing
==========
If you're working on the project, and need to build from source, it's done as follows:
.. code-block:: console
$ virtualenv .env
$ . ./.env/bin/activate
$ pip install -e .
Configuring Grafana Datasources
===============================
This repo used to contain a program ``gfdatasource`` for configuring
Grafana data sources, but it has been retired since Grafana now has a
built-in way to do it. See https://grafana.com/docs/administration/provisioning/#datasources
Community
=========
We'd like you to join the ``grafanalib`` community! Talk to us on Slack (see the links),
or join us for one of our next meetings):
- Meetings take place monthly: third Friday of the month 15:00 UTC
- https://weaveworks.zoom.us/j/96824669060
- `Meeting minutes and agenda
<https://docs.google.com/document/d/1JxrSszyPHYhNbJDWYZehRKv6AO4U-zIBhuNmYQVOIHo/edit>`_
(includes links to meeting recordings)
We follow the `CNCF Code of Conduct </docs/CODE_OF_CONDUCT.rst>`_.
Getting Help
------------
If you have any questions about, feedback for or problems with ``grafanalib``:
- Read the documentation at https://grafanalib.readthedocs.io
- Invite yourself to the `Weave Users Slack <https://slack.weave.works/>`_.
- Ask a question on the `#grafanalib <https://weave-community.slack.com/messages/grafanalib/>`_ slack channel.
- `File an issue <https://github.com/weaveworks/grafanalib/issues/new>`_.
Your feedback is always welcome!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
grafanalib-0.6.3.tar.gz
(46.5 kB
view details)
Built Distribution
File details
Details for the file grafanalib-0.6.3.tar.gz
.
File metadata
- Download URL: grafanalib-0.6.3.tar.gz
- Upload date:
- Size: 46.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 446b004e934fb7722f6dc5a69c72105f11ef5c31284362c82a338e87c603e1fa |
|
MD5 | 67228864a1ce2b1a40f6fda962fbeb6f |
|
BLAKE2b-256 | f70fe90d9a2db31e6ed7cd924c004b8ea905f006bd205e6670cc8aa9703e3fc2 |
File details
Details for the file grafanalib-0.6.3-py3-none-any.whl
.
File metadata
- Download URL: grafanalib-0.6.3-py3-none-any.whl
- Upload date:
- Size: 53.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01d9d3cad6f44540b25b2f5e4ea58a8976e372c615bd7d36c302f46af7a8113e |
|
MD5 | 512093b8d3731757158088d064d5cd55 |
|
BLAKE2b-256 | a62220339af7acdcb55c607a2de2f3230b20653f2e6b0cf7c87e5acff7dd6d6b |