Splunk Enterprise

help on append command in a line chart

jip31
Motivator

hello

I need to display 2 curves in my line chart from two different index

so i am doing this :

index="disk" sourcetype="Perfmon:disk" 
| bin span=10m _time 
| eval time=strftime(_time, "%H:%M:%S") 
| stats avg(Value) as Disque by time 
| eval Disque=round(Disque, 2) 
| append
    [ search index="mem" sourcetype="Perfmon:mem" 
    | bin span=10m _time 
    | eval time=strftime(_time, "%H:%M:%S") 
    | stats avg(Value) as Mémoire by time 
    | eval Mémoire=round(Mémoire, 2)]

the problem I have is that on the x axis my curves are not aligned on the same time slot

jip31_0-1707207151990.png

what is wrong please?

thanks

Labels (1)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

You need to get  your stats into the same events. Try something like this

index="disk" sourcetype="Perfmon:disk" 
| bin span=10m _time 
| eval time=strftime(_time, "%H:%M:%S") 
| rename Value as Disque 
| append
    [ search index="mem" sourcetype="Perfmon:mem" 
    | bin span=10m _time 
    | eval time=strftime(_time, "%H:%M:%S") 
    | rename Value as Mémoire]
| stats avg(Disque) as Disque avg(Mémoire) as Mémoire by time 
| eval Disque=round(Disque, 2) 
| eval Mémoire=round(Mémoire, 2)

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You need to get  your stats into the same events. Try something like this

index="disk" sourcetype="Perfmon:disk" 
| bin span=10m _time 
| eval time=strftime(_time, "%H:%M:%S") 
| rename Value as Disque 
| append
    [ search index="mem" sourcetype="Perfmon:mem" 
    | bin span=10m _time 
    | eval time=strftime(_time, "%H:%M:%S") 
    | rename Value as Mémoire]
| stats avg(Disque) as Disque avg(Mémoire) as Mémoire by time 
| eval Disque=round(Disque, 2) 
| eval Mémoire=round(Mémoire, 2)
0 Karma

jip31
Motivator

thanks

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...