Omit pinned filters that are inappropriate to a dashboard?

I have developed a set of dashboards. At the top of each dashboard is a Markdown panel that contains a row of links to those dashboards.

Some dashboards can be usefully filtered by the job_name field, so it makes sense for users to pin a filter for job_name. However, the data for other dashboards does not include a job_name field; for those dashboards, a job_name filter causes the dashboard visualizations to display "No results found".

User beware? Or is there a workaround?

For this use case, Kibana's implementation of persistent ("pinned") filters is unfortunate. An alternative would be to persist variables across dashboards. If a query in a target dashboard refers to a variable, then that variable value is used. Otherwise, the variable is benign: rather than causing "No results found", the variable simply isn't used by that dashboard.

Fugly kludges that occur to me:

  • Define a filter, saved with the dashboard, that somehow "nullifies" (cancels) any pinned filter for a specified field, for that dashboard.
  • Specify something in the dashboard link URL to do as described in the previous item: nullify any pinned filter for a specified field.

Thoughts, suggestions welcome. I'd prefer to not involve a separate tool, such as kibana-URL-filter-creator (nice as it looks).

There is an advanced setting courier:ignoreFilterIfFieldNotInIndex:

This configuration enhances support for dashboards containing visualizations accessing dissimilar indexes. When disabled, all filters are applied to all visualizations. When enabled, filter(s) will be ignored for a visualization when the visualization's index does not contain the filtering field.

Would this cover your use case?


Yes! Thank you for pointing out that setting to me. That works for me.

Idea (worth a feature request issue? let me know what you think): a visual cue that the filter has been ignored would be nice. (Graying-out?)

I do get a visual cue in the Discover tab:


but not in a dashboard. What's going on here?

I initially thought, "This dashboard doesn't contain any visualizations that use indices that contain job_name". But then it occurred to me: I've got the same TSVB Markdown panel at the top of each dashboard. That panel doesn't actually perform any query—it exists only to render Markdown with custom CSS—but it still has to specify an index pattern.

Sure enough, I'd set the index pattern in the TSVB Markdown panel to an index pattern that contains job_name.

When I change that panel to use a different index pattern, the job_name filter shows "Warning".

Perhaps I should create a new topic for this, but it's an unexpected follow-on consequence of applying the solution for this topic: I'm using a TSVB panel for Markdown only because the "standard" Markdown panel doesn't support custom CSS. I don't really want to specify an index pattern for that panel; I don't want to have to risk specifying an index pattern that might interfere with that "Warning" visual cue. I've inserted that Markdown panel in numerous dashboards.

I've tried specifying a bogus index pattern (for example, the literal string none) in that TSVB Markdown panel, but that causes the panel to display the message "No results found" (again, I'm only using this TSVB panel because I want to apply custom CSS to static Markdown—no Handlebars expressions in this instance).

Do I need to create an "innocuous" index pattern just for this purpose? (Yuk!)

Advice welcome.

For now—hopefully only as a temporary stopgap—I've set the index pattern of that TSVB Markdown panel to .kibana. I'd already defined that as an index pattern for dev/research purposes. But I don't particularly want to deploy/distribute my dashboards with a .kibana index pattern as a requirement, so I'm still looking for a proper solution (to this follow-on issue).

That's kind of a gap right now - only TSVB allows to specify custom css on a dashboard at the moment. Definitely worth opening a feature request issue for the regular markdown vis to support custom css as well.

I've added a comment to the existing issue "CSS controls in Markdown widget".

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