Splunk Search

Can you help me with a subsearch?

jip31
Motivator

Hi,

I use the search below in order to display the model of a host for only the host which has a Wear_Rate>0

But the Model field is empty.

Could you help me to display the model for all the machines which have a Wear_Rate>0 please??

eventtype=Charge AND (NOT host=E* AND NOT host=I*) 
| stats first(FullChargedCapacity) AS FullChargedCapacity first(DesignedCapacity) AS DesignedCapacity first(_time) AS _time BY host 
| eval time = strftime(_time, "%m/%d/%Y %H:%M") 
| eval Wear_Rate = 100-(FullChargedCapacity *100/DesignedCapacity) 
| where Wear_Rate >0
| dedup host
| join type="outer" 
    [ search index="x" sourcetype="x" 
    | rex "Model=(?<model>.*)" 
    | stats values(model) as Model by host 
  ]
0 Karma
1 Solution

cvssravan
Path Finder

One basic observation is, you missed to mention the field on which you want to join, see below:

| join type="outer" host

try this and let me know if it worked

View solution in original post

0 Karma

cvssravan
Path Finder

One basic observation is, you missed to mention the field on which you want to join, see below:

| join type="outer" host

try this and let me know if it worked

0 Karma

jip31
Motivator

yes thanks

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...