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
---
What goes around comes around. If it helps, hit it with Karma 🙂

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
---
What goes around comes around. If it helps, hit it with Karma 🙂
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!

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...