Getting Data In

Putting 20 host names in a tag and searching

mmensch
Path Finder

I have 20 host names and I want to use tags.

I've been doing my searches host=X OR host=Y OR host=Z, but I want to use tags instead since it is much easier on the eyes in a search string.

Let's say I create a tag called xyz with host=X, host=Y, host=Z.

To search on this, I am trying to use "tag=xyz | stats count by host" but I am getting no results. I have also tried searching "tag::host=xyz | stats count by host" and I am still getting no results.

What am I doing wrong here?

0 Karma

woodcock
Esteemed Legend

The simplest thing to do is to create an eventtype There will be a field called Search string where you paste your search and a field called Tag(s) where you paste your tag name. Done!

0 Karma

Jeremiah
Motivator

If you search for tag=xyz with no stats command, do you see any results?
If you search for any of the hosts you have tagged, do your results show that your hosts are tagged?

0 Karma

mmensch
Path Finder

I'm not seeing the tag.. when just doing a host=X...

Also, is there a limit on how many hosts can be in the tag?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...