United Statesweaveworks/grafanalib
Python library for building Grafana dashboards
Featured achievements
The project's latest awards
#1 Repository of the week
#4 Repository of the week
#1 Repository of the week
=============================== Getting Started with grafanalib
.. image:: https://readthedocs.org/projects/grafanalib/badge/?version=main :alt: Documentation Status :scale: 100% :target: https://grafanalib.readthedocs.io/en/main
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.11.
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 currently don't follow a roadmap for grafanalib and both maintainers <https://github.com/weaveworks/grafanalib/blob/main/MAINTAINERS> have recently
become somewhat occupied otherwise.
We'd like you to join the grafanalib community! If you would like to
help out maintaining grafanalib that would be great. It's a fairly laid-back
and straight-forward project. Please talk to us on Slack (see the links below).
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!
Similar Projects
Discover other similar projects and AI models.
Full-stack observability · Metrics · Logs · Traces · Flows · Topology · Infrastructure · APM · NPM · DBM · RUM · Synthetics · Cloud · AI SRE · OpenTelemetry · SNMP · NetFlow/IPFIX/sFlow · IPMI · Redfish · 2000+ integrations
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...
Streamlit — The agent-native framework for data apps and dashboards.
Python tool for converting files and office documents to Markdown.
利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.
π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection — all without a single pixel of video.