Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zpascal/grafana_dashboard_templater
The Grafana dashboard templater create a valid Grafana dashboard as dictionary based on a template and injected values.
https://github.com/zpascal/grafana_dashboard_templater
dashboard grafana monitoring template
Last synced: 18 days ago
JSON representation
The Grafana dashboard templater create a valid Grafana dashboard as dictionary based on a template and injected values.
- Host: GitHub
- URL: https://github.com/zpascal/grafana_dashboard_templater
- Owner: ZPascal
- License: apache-2.0
- Created: 2021-12-20T22:43:52.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-15T10:30:02.000Z (4 months ago)
- Last Synced: 2024-10-03T05:06:32.580Z (about 1 month ago)
- Topics: dashboard, grafana, monitoring, template
- Language: Python
- Homepage: https://zpascal.github.io/grafana_dashboard_templater/
- Size: 5.68 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Grafana dashboard templater ![Coverage report](https://github.com/ZPascal/grafana_dashboard_templater/blob/main/docs/coverage.svg)
## Description
The Grafana dashboard templater create a valid Grafana dashboard as dictionary based on a template and injected values. You can find sample dashboards [here](./dashboard-templates/database), but note that you will need to adjust the appropriate settings for your own data sources.
## Dashboard template folder structure
```
dashboard-templates <- Folder of the dashboard templates
database <- Dashboard type
postgresql <- Dashboard name
v13 <- Dashboard version
dashboard.json.sample <- Dashboard template
```## Installation
`pip install grafana-dashboard-templater`
## Example
```python
from grafana_dashboard.model import Model
from grafana_dashboard.dashboard import Dashboarddashboard_model: Model = Model(dashboard_templates_path="./dashboard-templates", dashboard_type="database",
dashboard_name="postgresql", dashboard_version="v13")dashboard: Dashboard = Dashboard(dashboard_model)
dashboard_json = dashboard.get_dashboard_json(template_values={"app_name": "PostgreSQL", "prometheus_name": "k8s-sonarqube-postgresql"})
```## Contribution
If you would like to contribute something, have an improvement request, or want to make a change inside the code, please open a pull request.## Support
If you need support, or you encounter a bug, please don't hesitate to open an issue.## Donations
If you want to support my work, I ask you to take an unusual action inside the open source community. Donate the money to a non-profit organization like Doctors Without Borders or the Children's Cancer Aid. I will continue to build tools because I like them, and I am passionate about developing and sharing applications.## License
This product is available under the Apache 2.0 license.