Splunk Search

How can I count lines?

LauraBre
Communicator

hello,

This is my search:

source=tcp:5555 PURCH_DAY=06-14 PURCH_DATE=19  PURCH_MIN>44 | stats count by ID_CARDHOLDER| sort - count | where count>=5|rangemap field=count severe=10-50 elevated=3-9 default=low

My problem is that I don't able to count the number of lines that my search returns. I want to apply my rangemap on the number of lines but I don't know how I can do it because I try count(_raw) but I don't use it correctly I think.

Thx by advance,

Laura

Tags (1)
0 Karma
1 Solution

kristian_kolb
Ultra Champion
... |stats sum(linecount) AS MyTotalLines | ...

/kristian

View solution in original post

kristian_kolb
Ultra Champion
... |stats sum(linecount) AS MyTotalLines | ...

/kristian

LauraBre
Communicator

No, I want to count the total lines that my search returns, not indivduals raw events.

0 Karma

Ayn
Legend

Number of lines in what? Individual raw events? Have you checked the linecount property?

Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...