# Create visualizations based on Kibana saved objects, including tags?

**URL:** https://discuss.elastic.co/t/create-visualizations-based-on-kibana-saved-objects-including-tags/270073
**Category:** Kibana
**Created:** [April 14, 2021, 2:14am UTC](https://discuss.elastic.co/t/create-visualizations-based-on-kibana-saved-objects-including-tags/270073 "2021-04-14T02:14:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![GrahamHannington](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grahamhannington/32/4404_2.png) [@GrahamHannington](https://discuss.elastic.co/u/GrahamHannington)
#### Post date: [April 14, 2021, 2:14am UTC](https://discuss.elastic.co/t/create-visualizations-based-on-kibana-saved-objects-including-tags/270073/1 "2021-04-14T02:14:06Z")

</div>

I'm creating dashboards in Kibana 7.11.2 for multiple types of event from a single application. In the data I'm working with, the event types are characterized by different values of a field named `tableName`. While there is a common set of field across all values of `tableName`, events for each `tableName` also have their own unique set of fields.

I'm working through the event types, creating dashboards for each of them. For now, the dashboards are single-type, but I'll likely also create "mashup" dashboards, combining different event types.

I want to keep track of which event types I've covered. Ideally, I'd like to have a dashboard for this purpose.

I already have a dashboard that shows the range of `tableName` values for which I have data.  
And I've started tagging the saved objects in Kibana, where the tag names match the corresponding `tableName`.

I want to visualize these tags.

For example, ideally, I'd like to enhance my current chart, that shows the range of `tableName` values, to also show the number of saved objects tagged with that table name. So I can see, at a glance, which tables I've created visualizations for.

I've created an index pattern for the `.kibana` index. In the Discover tab, I can view the JSON of the saved objects. For example, I can see the `tag.name` field values.

However, I'm having trouble visualizing fields in that index pattern.

Ideally, I'd like to add another layer to the existing lens that visualizes `tableName` values, but the Kibana Lens UI doesn't show `tag.name` in the list of available fields.

I've tried creating an aggregation-based visualization using the `.kibana` index pattern, but I've run into issues there, too. I can go into detail, if asked.

Looking ahead, if I can visualize data in the `.kibana` index, I'd like to be able to visualize saved objects by tag name. The hurdle there is that saved objects refer to the ID of the tag, rather than the tag name, and it's not clear to me how to resolve that indirection to the tag name.

I'd welcome advice on how to do this.

---

<div class="post-metadata">

### Author: ![GrahamHannington](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grahamhannington/32/4404_2.png) [@GrahamHannington](https://discuss.elastic.co/u/GrahamHannington)
#### Post date: [April 14, 2021, 2:21am UTC](https://discuss.elastic.co/t/create-visualizations-based-on-kibana-saved-objects-including-tags/270073/2 "2021-04-14T02:21:03Z")

</div>

I know that I can use the Saved Objects table in the Kibana UI to see the tag names alongside saved objects, and also filter by tags. That's useful, but not quite what I'm after.

---

<div class="post-metadata">

### Author: ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)
#### Post date: [April 14, 2021, 10:14am UTC](https://discuss.elastic.co/t/create-visualizations-based-on-kibana-saved-objects-including-tags/270073/3 "2021-04-14T10:14:13Z")

</div>

I don't see a good way how you could achieve such a visualization. The biggest issue is that the tag name is not part of the dashboard/visualization saved object - it's using multiple documents which are referencing each other via auto generated id.

You could theoretically do it if you know all tags in advance and are fine with embedding it into the visualization configuration.

This is definitely not how visualizations were intended to be used, but it's a super interesting use case. Feel free to open a feature request for it here: [https://github.com/elastic/kibana/issues/new?assignees=&labels=&template=Feature\_request.md](https://github.com/elastic/kibana/issues/new?assignees=&labels=&template=Feature_request.md) Maybe we can build a nice integration for it.

Steps:

- Export your tags and find the ids in the resulting ndjson file - in this example the tag abc has the id `b4283d40-9d07-11eb-931c-9fc0716b9db0`:  
 ![Screenshot 2021-04-14 at 12.10.56](https://us1.discourse-cdn.com/elastic/original/3X/e/e/eed8e125539800679d3cefdabde8681650d487d4.png)
- Build a filters aggregation like this:  
 ![Screenshot 2021-04-14 at 12.13.14](https://us1.discourse-cdn.com/elastic/original/3X/b/9/b9171e8a6606966a24798b8351e7a5790de9345e.png)
- Filter has to be `references:{id: "<ID of the tag>"}` - you can use the name of the tag as label

It will give you the number of times each tag is used on a saved object

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 12, 2021, 10:14am UTC](https://discuss.elastic.co/t/create-visualizations-based-on-kibana-saved-objects-including-tags/270073/4 "2021-05-12T10:14:14Z")

</div>

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