Skip to content

v0.4.2 - improved datasource and ERB template support

Compare
Choose a tag to compare
@divinity666 divinity666 released this 17 Jun 20:01
· 315 commits to master since this release

This release is dedicated to support different datasources properly. Additionally it contains an improved ERB interface.

  • breaking changes
    • renamed global grafana-default-timeout asciidoctor variable to grafana_default_timeout to be consistent with other variable namings
  • new features
    • now supporting custom datasource plugin implementations, including validation of return types and catching errors in case of datasource implementation internal issues
    • add support for InfluxDB raw queries (composed queries still on the roadmap)
    • add multiple column support for Graphite datasources
    • add multiple column support for Prometheus datasources
    • now row_divider and column_divider attributes are also respected for alert and annotation queries (as it has always been documented...)
  • improvements
    • show error message if replace_values is called with a malformed regex
    • handle properly, if a dashboard datasource is not known to the reporter
    • improve README
    • ERB templates can now be created with easier syntax, e.g.
<%
dashboard = '<<your_dashboard_id>>'
instance = 'default'
panel = @report.grafana(instance).dashboard(dashboard).panel(<<your_panel_id>>)
query = QueryValueQuery.new(panel, variables: { 'result_type' => 'panel_value', 'query' => '<<your_panel_letter>>' })
%>
This is a test <%= query.execute %>.
  • bugfixes
    • handle image rendering properly, if grafana cannot render an image
    • fixed SQL table column header generation
  • nerd stuff
    • ERB environment is now running in a jail object binding, to handle available functions in templates easier
    • improved test coverage
    • DRYed and refactored code

Have fun!