Skip to content
Charles Lamarque edited this page May 22, 2017 · 8 revisions

Welcome to the Kibana_health_metric_vis wiki!

This plugin allows you to change the background color according to the parameters (critical or warning).

5 files are present:

  • health_metric_vis.html: HTML file that displays metrics
  • health_metric_vis.js: JS file that allows you to set the default options when you create a new visualization in Kibana.
  • health_metric_vis.less: LESS file that contains the plugin CSS
  • health_metric_vis_controller.js: JS file that contains the controller Angular
  • health_metric_vis_params.html: HTML file that contains the plugin options

File health_metric_vis_params.html

This HTML file displays the various options of the plugin. 7 parameters to remember:

  • vis.params.fontColor: the font color (in hexadecimal or the color name)
  • vis.params.redThreshold: Fixe the critical value
  • vis.params.yellowThreshold: Fixe the alert value
  • vis.params.invertScale: invert sense of comparison (above / below)
  • vis.params.greenColor: default color of the background
  • vis.params.redColor: background color when the value is above / below the critical value
  • vis.params.yellowColor: background color when the value is above / below the alert value

File health_metric_vis_controller.js

This file contains the logic of the plugin. mainly, everything relies on two functions: getColor and getFontColor.

  • getColor: This feature is based on comparisons between the value of the metric and the one defined in the redThreshold and yellowThreshold parameters. If a comparison is true, it returns the associated color (redcolor, yellowColor and GreenColor).
  • getFontColor: this function returns the color (fontColor) if the value of the metric exists.

Install plugin with Windows

  • Install the plugin on Windows (Kibana 5.0.0): bin/kibana-plugin.bat install file://C:/your/repository/name_pluging.zip
  • Remove the plugin on Windows (Kibana 5.0.0): bin/kibana-plugin.bat remove name_plugin
  • List the plugins on Windows (Kibana 5.0.0): bin/kibana-plugin.bat list
Clone this wiki locally