Splunk Search

Query on stats values

p_basanth
New Member

| stats values(Domain), count by Short_Host gives me overall count. But i need individual count of each Domain.

| stats count by values(Domain) does not provide any results.

I am expecting the below output

Host1 --> Domain1 --> 5

        --> Domain2 --> 8

        --> Domain3 --> 1

Host2 --> Domain1 --> 9

        --> Domain2 --> 3

        --> Domain3 --> 7

Tags (1)
0 Karma
1 Solution

Ayn
Legend

The by-clause expects field names, nothing else. You should take the Splunk tutorial if you haven't already, it covers things like this.

... | stats count by Short_Host,Domain

View solution in original post

0 Karma

Ayn
Legend

The by-clause expects field names, nothing else. You should take the Splunk tutorial if you haven't already, it covers things like this.

... | stats count by Short_Host,Domain
0 Karma

Ayn
Legend

? That's exactly what you get. If you want it split up not by Short_Host AND Domain, just split by Domain.

0 Karma

p_basanth
New Member

is it not possible to get count for each values(Domain)

0 Karma
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...