Skip to content

Releases: divinity666/ruby-grafana-reporter

v0.5.3 - Support dataframe reponses and variable datasources

24 Mar 07:21
Compare
Choose a tag to compare

This is a quick release, fixing some issues, which are related to new grafana versions and support advanced debugging.

  • new features
    • handle panels properly, where the datasource is configured by a variable (#23)
    • support dataframe responses for all internal datasources (#22)
  • improvements
    • issues during handling datasource responses will now throw proper error messages, including the query response as raw text for debugging purposes (added to support debugging of #24)

Enjoy!

v0.5.2 - Support newer Grafana versions datasource storage and dataframes for Prometheus

22 Mar 19:30
Compare
Choose a tag to compare

This release contains only bugfixes to enable compatibility with newer Grafana versions.

  • new features
    • support dataframes response format for Prometheus queries
  • improvements
    • show proper error message if a Datasource cannot handle the query response of Grafana, which might happen more often in future
  • bugfixes
    • support new way of storing Grafana datasources in JSON (Hash instead of Strings)

Let me know, if further bugs exist.

v0.5.1 - Improved prometheus support and some other minor improvements

18 Dec 21:45
Compare
Choose a tag to compare

This release mainly improves prometheus support.

  • improvements
    • add support for calling prometheus instant queries from sql inline and sql table queries with the parameter instant=true
    • add support for interval option in sql inline or table queries, which will replace $__interval variable in influx queries or will be forwarded to prometheus as step variable
    • add support for inline prometheus queries, including test case, please note: due to a bug ] in an inline prometheus query has to be escaped by \] (added note to help documentation)
    • add full support for vector, scalar and string instant query results of prometheus queries
    • properly handly prometheus query errors
    • improve checks of configuration files before starting up, e.g. checks for http:// or https:// at the beginning of host configurations
  • bugfixes
    • use panel configured step configuration in prometheus panels as default for interval option
    • added ERB support note in gem description
    • added missing blanks in log messages

Enjoy!

v0.5.0 - Improved debugging, added update-checks and several important new features

04 Nov 23:36
Compare
Choose a tag to compare

This release contains several important functionalities to improve debugging capabilities for future issues. Additionally it provides new features as the check-for-updates and the date formatting of query results.

The version number increase is dedicated to the new features, whereas updating from a previous version should be a no-brainer, except if you use custom datasource implementations. In that case, you might have to slightly adjust your implementation.

  • breaking changes
    • AbstractQuery implementations, i.e. especially custom datasource implementations, now have to contain :header and :content keys with at least an empty Array
  • new features
    • added class GrafanaEnvironmentDatasource to gather essential grafana configuration information, which is especially helpful for debugging
    • added class ReporterEnvironmentDatasource to gather essential reporter information, which is especially helpful for debugging
    • added asciidoctor function include::grafana_environment[], which shows the information from the GrafanaEnvironmentDatasource
    • added option check-for-updates in the grafana-reporter section in the configuration file, to check for new ruby-grafana-reporter versions. Setting this option to 0 will disable all checks. By default the checks will be performed on the first rendering on every day. Having this option enabled, you will be reminded of new reporter versions on every report rendering :-)
    • added function, so that date millisecond values can be translated to nice date formats with the format option. It is now possible to configuer, e.g. format="date:iso", or any other format specified here: https://momentjs.com/docs/#/displaying/
    • formatand filter_columns option now support commas to be escaped. Note: Escaping of commas has to be done by _, due to asciidoctor limitations. Example: format=\"date:MM_, D\". Using a comma without escape in these functions will be recognized as jump to the next column definition.
  • improvements
    • If a template variable is configured to allow selections out of a query result and All is selected for those template variables, the reporter will now properly respect this selection and handle it properly
    • improved error message, if image rendering could not be executed properly
    • show HTTP response in debug log, for all responses, which are different from 2xx
    • implemented proper shutdown function for the reporter webserver when using Ctrl-C
    • extended README documentation
    • improved asciidoctor function documentation
  • bugfixes
    • queries with include_headline="true" and transpose="true" will now also return the headlines properly transposed
    • fixed a bug, which prevented the render-width and render-height variables to be handed over to the image processor
    • fix frozen string modification
    • set influx composed queries to 'supported' in README
  • nerd stuff
    • raise an error if a date template variable is configured with a multi select value, as this is not supported by grafana
    • simplified and DRYed implementation of custom AbstractTableFormatStrategy implementations, by adding common functionality in abstract base class
    • improved test coverage
    • improved API documentation

Hope you enjoy it!

v0.4.5 - Influx query editor support and bugfix release

26 Aug 11:01
Compare
Choose a tag to compare

This release includes ability to use query editor to Influx datasources. Additionally it contains several bugfixes.

  • new features
    • now supporting influx query editor queries, i.e. queries composed by the grafana GUI
  • improvements
    • prometheus does have 2 different API endpoints, where the reporter only used one. Now provisionally implemented a proper call for both. This still needs some rework.
  • bugfixes
    • abstract query table responses returned arrays instead of a string, which could lead to issues - now they are gone
    • explicitly use GrafanaErrors full qualified names, as otherwise this is sometimes could lead to issues
  • nerd stuff
    • improved README
    • improved test coverage

Enjoy!

v0.4.4 - Table formatter and ERB demo reports

12 Jul 22:14
Compare
Choose a tag to compare

This release contains several huge bugfixes, but as well supports new features to create demo reports for ERB templates. Additionally it provides a proper way to format query table results in different formats.

  • breaking changes
    • AbstractReport received two new methods - if you use your custom AbstractReport implementation, ensure to add these methods
    • Added table_formatter option, which by default uses CSV and adoc_plain for asciidoctor. To customize the table results, you will now have to implement a TableFormatStrategy. If you want to keep the old behaviour, you may add table_format='adoc_deprecated' and you are then able to still use the deprecated row_divider and column_divider options.
  • new features
    • ERB reports can now also create a demo report - simply change your config file to use ERB reports and execute ruby-grafana-reporter -w
    • include_headline is now supported to add the SQL result headlines by default.
  • improvements
    • make grafana_report_timestamp available for ERB reports
    • show reporter version in webservice results
    • improved support for selection of All in dashboard template variables - still some work to be done
    • GrafanaErrors will no longer be reported as FATAL, but as ERROR only
    • extended README documentation
  • bugfixes
    • ensure that variable names always match completely prior replacing, i.e. e.g. $plant_id will no longer be replaced with variable $plant, but only with variable $plant_id
    • use SQL statements AS IS without removing whitespaces and newlines - now all your SQL statements should work properly
    • show error message if replace_values raises an error
    • fix an issue, where a template variable which can select multiple values, but only one was selected
    • fix frozen string modification
    • fixed old links in asciidoctor documentation
  • nerd stuff
    • fixed a duplicate ID in the test cases
    • move Help to Asciidoctor namespace
    • closing report files after build is now happening in done!
    • improved test coverage

Enjoy!

v0.4.3 - critical bug release

18 Jun 16:26
Compare
Choose a tag to compare

Please update to this version!

The version 0.4.2 contains a critical bug, which prevents it to run with many newer Ruby versions, because of frozen string issues. Please note that this issue also prevented the windows EXE to run properly.

Sorry for inconvenience.

Hope you can now really enjoy it :-)

v0.4.2 - improved datasource and ERB template support

17 Jun 20:01
Compare
Choose a tag to compare

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!

v0.4.1 - maintenance and ERB support release

17 May 08:51
Compare
Choose a tag to compare

Maintentance release sounds to small, though it means sometimes great news! In this case I fixed a bug, which prevented the windows executable to work with images - very anoying. Good news: this one is hunted down!

This release now supports ERB templates (currently a hidden feature). To make use of it, change the report-class option in your configuration file to GrafanaReporter::ERB::Report and test it with an template with ERB syntax, e.g. I am <%= 3 * 4 %> years old. The reporter API currently is not as nice as it should be, but can already be used be experts. Please note, that ERB templates can contain malicious content. Make sure your environment is safe (enough), if you enable ERB templates.

  • breaking changes
    • as asciidoctor removed support for ruby 2.3, I am doing so here as well
  • new features
    • added support for ERB templates
    • add command line option -r to register your own ruby extensions, e.g. your own datasources or report classes
    • know what you can do and what not: now we are handling unsupported datasource calls properly!
    • allow templates to be called by full filename including extension
  • improvements
    • support images now also on windows builds
    • README overworked
    • ensure that grafana_report_timestamp is now always identical to localdatetime for asciidoctor reports
  • bugfixes
    • do not add duplicate trailing .adoc extension
    • accidentally config_file and ssl_cert were allowed to be folders - which obviously does not make sense
  • nerd stuff
    • added API methods to gracefully shutdown webserver and return its status (especially needed for proper test cases)
    • fixed broken links and improved API documentation
    • countless refactorings

Enjoy!

v0.4.0 - demo report wizard, webhooks and much more

14 Apr 21:10
Compare
Choose a tag to compare

Many, many hours of work went into this release. Hope you enjoy the new features as a user and the nerd stuff changes as a developer:

  • new features
    • added a demo report wizard, which automagically can generate a demo report, containing real-life calls to your specific configured grafana instance. By that you can immediately see a working report after using the configuration wizard - nice, isn't it?
    • added event webhook callbacks, which can be used to inform other tools about report generation status. This feature can be configured in your reporter configuration file. To understand how it works, use the configuration wizard (e.g. ruby-grafana-reporter -w -c my_new_config_file) to create a new config file and have a look at the comment rows.
    • added support for graphite and prometheus datasources
  • improvements
    • improved relative time range calculations, to correctly accept grafana calls like now/d-30d+5h
    • tightened README documentation and removed additional INSTALL documentation - hope you like it
    • reworked API documentation
  • fixes
    • inline images are now working properly
    • the webservice did not properly increase the progress, which should be fixed now
    • fixed wrong help texts
    • fixed a warning message, if the reporter is called for single template conversions
  • nerd stuff
    • COMPLETE rework of class responsibilities and namespaces for more clearness
    • implemented a new WebRequest class to standardize all calls including properly using authentication and HTTPS for all calls
    • complete redesign of test cases
    • fixed race condition on automated tests by using the webhook callback feature. This now improves also the test execution speed.
    • fixed test cases on time calculations (now forcing to use UTC). This should now be working all over the world
    • added test cases for HTTPS calls

Enjoy it!