Splunk Search

Stats Dc & Substr

IRHM73
Motivator

Hi, I wonder whether someone may be able to help me please.

I'm trying to change the 'dedup' element of the query below to a stats dc:

index=main auditSource=ntc "detail.method"=POST detail.statusCode=204 | dedup tags.path | head 8000 | eval `nino=substr('tags.path',6,9) | table nino _time`

I've changed dedup tags.path to stats dc(tags.path), but when I run the query I'm no longer returning any results.

could someone tell me please where I've gone wrong.

Many thanks and kind regards

Chris

0 Karma
1 Solution

IRHM73
Motivator

Hi, for those who may be interested, I solved this with the following query:

index=main auditSource=ntc "detail.method"=POST detail.statusCode=204 | head 8000 | eval nino=substr('tags.path',6,9) | stats dc(nino) by nino, _time |table nino _time

Kind Regards

Chris

View solution in original post

0 Karma

IRHM73
Motivator

Hi, for those who may be interested, I solved this with the following query:

index=main auditSource=ntc "detail.method"=POST detail.statusCode=204 | head 8000 | eval nino=substr('tags.path',6,9) | stats dc(nino) by nino, _time |table nino _time

Kind Regards

Chris

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...