Splunk Search

Can you help me with a stats count with different field names?

jip31
Motivator

hello,

I use the two query below

index="x" sourcetype="WinEventLog:Microsoft-Windows-Diagnostics-Performance/Operational" | stats dc(Durée de la dégradation) by "Nom_du_fichier" 

index="x" sourcetype="WinEventLog:Microsoft-Windows-Diagnostics-Performance/Operational" | stats dc(Degradation Time) by "File_Name" 

I need to concatenate these 2 queries because the fields are the same: one is in french and one is in english.

I want to do a stats dc with "Durée de la dégradation" and "Degradation Time" and a by with "Nom_du_fichier" and "File_Name"in the same time

could you help me please???

Tags (2)
0 Karma
1 Solution

renjith_nair
Legend

@jip31,

Try

index="x" sourcetype="WinEventLog:Microsoft-Windows-Diagnostics-Performance/Operational" 
|eval Degradation_Time=coalesce('Durée de la dégradation','Degradation Time')
|eval File_Name=coalesce(Nom_du_fichier,File_Name)
|stats dc(Degradation_Time) by File_Name
Happy Splunking!

View solution in original post

0 Karma

renjith_nair
Legend

@jip31,

Try

index="x" sourcetype="WinEventLog:Microsoft-Windows-Diagnostics-Performance/Operational" 
|eval Degradation_Time=coalesce('Durée de la dégradation','Degradation Time')
|eval File_Name=coalesce(Nom_du_fichier,File_Name)
|stats dc(Degradation_Time) by File_Name
Happy Splunking!
0 Karma

jip31
Motivator

perfect renjith thanks

0 Karma

FrankVl
Ultra Champion

You'll simply need to rename the french fields to have the same name as the english fields, before doing your stats.

0 Karma

jip31
Motivator

thanks franck

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...