{"repo":"etsy/rules_grafana","free":true,"listed":false,"github":"https://github.com/etsy/rules_grafana","clone":"git clone https://github.com/etsy/rules_grafana.git","description":"Bazel rules for building Grafana dashboards","language":"Starlark","stars":74,"topics":["bazel","grafana","bazel-rules","non-sox"],"license":"MIT","category":"analytics","readme_excerpt":"rules grafana for Bazel Dashboards as code, the Bazel way. Write Grafana dashboards with Python and build them into a reusable Docker image. Try it out Installation From Bazel Central Registry (recommended) Add to your MODULE.bazel : From GitHub (before BCR publication) Bazel compatibility Requires Bazel 8.0.0 or later with bzlmod enabled. rules grafana depends on rules python and rules oci , but these are automatically managed through Bazel's module system. Usage rules grafana makes it easy to build dashboards and incorporate them into your Bazel build, and to build a complete, runnable Docker image. Dashboards can be either hard-coded JSON files or Python scripts that generate dashboards. JSON dashboards Use json dashboards to add JSON files containing dashboards to your build. The JSON must be a complete, valid Grafana dashboard; see the Grafana docs for details on the JSON format. Unlike using the JSON files directly, json dashboards will check the syntax of your files and ensure that each dashboard has a uid set, to ensure it has a consistent URL in Grafana. Python dashboards Dashboards can also be generated with Python, using the grafanalib library. grafanalib is automatically imported, and you can also add other deps to help build your dashboard. Each Python dashboard file should print the complete JSON of a Grafana dashboard. An easy way to do that is to follow a template like this: Use py dashboards to add Python files that generate dashboards to your build. You can ","default_branch":null,"files":null,"tree":[],"storefront":"/r/etsy","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/etsy/rules_grafana/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}