Splunk Search

issue in correlation search

kjain041523
Observer

| tstats summariesonly count dc(IDS_Attacks.dest) as dest from datamodel=Intrusion_Detection.IDS_Attacks where * by IDS_Attacks.src IDS_Attacks.signature _time | drop_dm_object_name("IDS_Attacks") | search NOT signature=Unknown* signature="Vulnerability exploit detection(32796)"


please provide the correct splunk query to display raw events and statistics

Labels (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @kjain041523 ,

if you use a Data Model, you don't have raw data, so you have to divide the output in two panel with two searches (one using DM for statistics and one using indexes for raw data, eventually filtering results from the first panel) or use indexes.

Using indexes in one search, you could try something like this:

(`cim_Intrusion_Detection_indexes`) tag=ids tag=attack
| stats 
     count 
     dc(IDS_Attacks.dest) as dest 
     values(_raw) AS _raw
     by src signature _time 
| `drop_dm_object_name("IDS_Attacks")` 
| search NOT signature=Unknown* signature="Vulnerability exploit detection(32796)"

Ciao.

Giuseppe

P.S.: WHERE * has no sense!

0 Karma

PickleRick
SplunkTrust
SplunkTrust

1. What do you mean by "statistics" here?

2. If you use tstats with datamodel summaries, you don't deal with raw events.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

What is wrong with what you already have tried?

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Rounding off the Splunk Dashboard Contest

What does a contest-winning Splunk dashboard look like? In this case, it isn't in a browser tab at all. It ...

A Four Part Event Series: AI + Observability: AI Agents, LLMs, Apps, & Infrastructure

AI + Observability: AI Agents, LLMs, Apps, & Infrastructure The rapid evolution of artificial intelligence ...