Kibana 5.5 Metrics Visualization Hyperlink Customization?


(Huy) #1

Hi. I was wondering if there was documentation for how the Metrics plugin works as there are a lot of injections/dependencies? I need to add an option to make the label a hyperlink. I managed to customize the metrics visualization in Kibana 4 and currently trying to figure how to do the same to Kibana 5. Thanks!

This is what I created in Kibana 4 and need to replicate in Kibana 5:

image


(Spencer Alger) #2

Nice!

By Kibana 5 I'm going to assume you're talking about Kibana 5.5. Kibana is changing pretty rapidly under the hood and the difference between 5.0 and 5.5 is pretty drastic. If you're not up to 5.5 yet I recommend you give it a shot, but I can't guarantee this is info is accurate for all 5.x versions

The metrics plugin is what powers the new "Time Series Visual Builder" and the Metric visualization is now a part of the kbn_vislib_vis_types plugin. The Metric visualization is also now powered by our D3 based vislib. This means that it is rendered in SVG rather than HTML, so unfortunately you'll have to make a fair amount of changes to get this extension working again.

If your main goal is to have a big number with a link under it, I would probably create a whole new VisType rather than trying to tweak the Metric vis. If you want all the features of the new Metric vis though, skip this part. The Metric vis from Kibana 4 was a TemplateVisType, meaning that it renders an Angular template and styling is done with CSS. To see how that looks in Kibana 5.5 I recommend checking out the Tag Cloud visualization. Most of the template and controller from the old Metric vis should be reusable if you want to go this approach.

Alternatively, if you want all of the functionaity of the new Metric vis but also want to make the label's linkable, I would start by tweaking the params/options/editors of the MetricVisType to get the desired controls in place, and then I would extend the GuageChart from the vislib to consume and render those params. Keep in mind that there is a lot of reuse in the vislib, so the changes you make might impact the other vislib based visualization types. That also means that if you do it right you might be able to get support for linkable labels in all vislib visualizations.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.