Splunk Search

Why am I receiving fewer events when using rename command in Splunk?

vjsplunk
Loves-to-Learn Lots

I am getting fewer events when using rename command in splunk. ( Compared to the search where I haven't used rename). What could be the reason behind this?

Labels (1)
0 Karma

vjsplunk
Loves-to-Learn Lots

Without rename:

index="A"  sourcetype="B"
| stats values(project_name2), count(linecount) by pod
| sort - count(linecount) | head 10

With rename:

index="A"  sourcetype="B"

| stats values(project_name2) as project count(linecount) as lines by pod
| sort - count(linecount) | head 10

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @vjsplunk,

the reason is that in the second case you don't have more ths field "count(linecount)" but the field "lines", so when you sort you have few events, please try this:

index="A"  sourcetype="B"
| stats values(project_name2) AS project count(linecount) AS lines BY pod
| sort -lines 
| head 10

Ciao.

Giuseppe

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @vjsplunk,

could you share your searches (with and without rename)?

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

3 Ways to Make OpenTelemetry Even Better

My role as an Observability Specialist at Splunk provides me with the opportunity to work with customers of ...

What's New in Splunk Cloud Platform 9.2.2406?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2406 with many ...

Enterprise Security Content Update (ESCU) | New Releases

In August, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...