Splunk Search

How to pull a value from one column based on condition on another column?

infoneo
New Member

I am trying to run an equivalent of the below query in splunk search, please help.

SELECT CONCAT(run, '.', tag) as file_name,time_at as end_time FROM log WHERE message = 'processing' and msg_type = 'COMPLETE' order by id desc

index=history source=mysql-pipe sourcetype=pipeline_logs|eval file_name=run_name.".".tag |eventstats time_at as start_time where like(message,"processing") AND like(message,"COMPLETE") |table file_name start_time

Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Looks like there's a typo in your question. like(message, "COMPLETE") likely should be like(msg_type,"COMPLETE").

---
If this reply helps you, Karma would be appreciated.
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 ...