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!

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...

Adoption of Infrastructure Monitoring at Splunk

  Splunk's Growth Engineering team showcases one of their first Splunk product adoption-Splunk Infrastructure ...

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...