Kibana - URL filtering


(Jeroen Tebbens) #1

Hi all,

I am using URL links below to browse through several dashboards. On a main dashboard I define a "customer id" which I pin to the global filter. When I click on a link without any filter but just another dashboard it keeps the filter pinned. But when I use a link like example below it will strip the preset filter (ie customer_id) and only selects the element_name I click from a VB table Panel url with {{key}} as a parameter and the customer filter is gone (even when pinned).

Question, is there a way to keep the active filter like customer_id as is and apply an additional filter like ci_name or element_name (cpu, memory, interfaces). Reason asking is without customer_id you would end up with any interface named "FastEthernet0/0" which could exist on several customers network devices.

kibana#/dashboard/?_g=(description:'',filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:b28d2560-c210-11e8-81ef-b15d4ea8e3f2,key:element_name,negate:!f),query:(match:(element_name:(query:'{{key}}',type:phrase))))),fullScreenMode:!f,options:(darkTheme:!f,hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!f,title:'',viewMode:view)


(Jeroen Tebbens) #2

Anyone some guidance on how to do this?


(Joe Fleming) #3

But when I use a link like example below it will strip the preset filter (ie customer_id) and only selects the element_name I click from a VB table Panel url with {{key}} as a parameter and the customer filter is gone (even when pinned).

The reason for this is because the filter is stored as part of the URL, and when you click on the link in the markdown, you're effectively completely resetting the application state to whatever is in that link (in your case, something without that pinned filter).

I think what you're looking for is a way to make the links in your markdown a little more dynamic. For example, having it dynamically preserve the pinned filter on the customer_id field, if one exists. Unfortunately, there's no way to do that in the markdown vis in Kibana, the values in there are all static (which again, is why you are losing the pinned filter in the app state).

I'm not really experienced with it, but the markdown vis in the Visual Builder supports Handlebars syntax, meaning you can substitute values in that way. However, I don't think you can use anything from the app state to pick those values, so that's probably a dead end too.

Ultimately, what you need is a way for your users to quickly filter the data in the dashboard based on some values in a given field in the index. The "Controls" vis might be a good choice for that. It would allow you to add a dropdown to the dashboard, populated by values in a field (customer_id here), and when a users picks the value, it creates a filter. Something like this:

Dec-10-2018%2016-36-18