Splunk Search

data count from differents report in the same report

jip31jip31
Explorer

Hi

I use 4 différents reports for doing a count of data

1) index="wineventlog" sourcetype="wineventlog:application" SourceName=Endpoint EventCode=* Type=Erreur RecordNumber "Type=Erreur" SourceName | stats count by Type
2) index="wineventlog" sourcetype="WinEventLog:Microsoft-Windows-TaskScheduler/Operational" RecordNumber EventCode=* Type=Avertissement | stats count by Type
3)....
4)....

I want to use only 1 report
how can i do please????

Tags (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

You should be able to combine your searches with OR.

index="wineventlog" (sourcetype="wineventlog:application" SourceName=Endpoint EventCode= Type=Erreur RecordNumber "Type=Erreur" SourceName) OR (sourcetype="WinEventLog:Microsoft-Windows-TaskScheduler/Operational" RecordNumber EventCode= Type=Avertissement) OR (...) OR (...) | stats count by Type
---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

You should be able to combine your searches with OR.

index="wineventlog" (sourcetype="wineventlog:application" SourceName=Endpoint EventCode= Type=Erreur RecordNumber "Type=Erreur" SourceName) OR (sourcetype="WinEventLog:Microsoft-Windows-TaskScheduler/Operational" RecordNumber EventCode= Type=Avertissement) OR (...) OR (...) | stats count by Type
---
If this reply helps you, Karma would be appreciated.
0 Karma

jip31jip31
Explorer

many thanks it s perfect (i had forgotten parenthesis)
i would like another evolution please
in my Dashboard i would like to add a column with the 5 items below
the items are not linked to an event
McAfee_Critical_Errors
Sysmon_Critical_Errors
Application, Security & System_Critical_Errors
PowerShell_Critical_Errors
Operational Scheduled task_Critical_Errors
thanks for you help

0 Karma

richgalloway
SplunkTrust
SplunkTrust

It depends on the source for those 5 items. Perhaps you should post a new question on that topic.

---
If this reply helps you, Karma would be appreciated.
0 Karma

jip31
Motivator

in fact i use this request:
index="wineventlog" (sourcetype="wineventlog:application" SourceName=endpoint SourceName="McAfee Endpoint Security" EventCode=* Type=Erreur RecordNumber "Type=Erreur") OR (sourcetype="WinEventLog:Microsoft-Windows-TaskScheduler/Operational" RecordNumber SourceName="Microsoft-Windows-TaskScheduler" EventCode=* Type=Avertissement) OR (sourcetype="wineventlog:*" "Type=Critique" RecordNumber) OR (sourcetype="WinEventLog:Windows PowerShell" EventCode = 400 OR EventCode = 600 RecordNumber) | stats count by SourceName Type

i just have a problem for the sourcetype "wineventlog" because his sourcename is variable
so i would like to rename this sourcetype as "Windows Events"
i trie with rename but it dont works! syntax problem?
thanks

0 Karma

niketn
Legend

@jip31jip31 please accept @richgalloway 's answer if your issue is resolved 🙂

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
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!

Developer Spotlight with Denis Gladkikh

From Splunk Engineer to Kubernetes App Builder Denis GladkikhWhat happens when a lifelong developer turns a ...

Governing Enterprise AI, Bringing Cisco Telemetry Home, and More from Splunk Lantern

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

Agentic SOC Triage: Investigating Splunk ES Notables with MCP Server and a Local LLM

The Problem: Too Many Alerts, Too Little Context Security operations teams running Splunk Enterprise Security ...