This library is intended to help autogenerate Grafana dashboards
Add the dependency to your project's shard.yml
:
dependencies:
crafana:
github: spoved/crafana.cr
The Crafana::Builder
can be used to generate dashboards and sub panels.
builder = Crafana::Builder.new
builder.add_dashboard("My new dash") do |dash|
# Add sub panels to the dashboard here
dash.add_row("row 1") do |row|
# Configure row here
end
dash.add_graph("graph 1") do |graph|
# Configure graph here
end
end
The dashboard json can be exported via the to_json
method.
builder.dashboards.first.to_json
- Fork it (https://github.com/spoved/crafana/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- Holden Omans - creator and maintainer
- Christian Nicolai - Superuser!