Splunk Search

if else conditions in query

Madhusri
Engager

Hi Team,

Current table

columnrow1row2
statusfailuresuccess

 

My Requirement-

1------if the row 1 has value as failure and if row 2 itself itself does not exists then row1 has to be renamed to failure

2------if the row 1 has value as success and if row 2 itself itself does not exists then row1 has to be renamed to success

3------if the row 1 has value as success and if row 2 has the value as failure ,then row 1 wants to renamed to as success and row 2 as failure.

4------if the row 1 has value as failure and if row 2 has the value as success, then row 1 wants to renamed to as failure and row 2 as success.

 

All these cases need in single query.

Can anyone help on this?

Regards,

Madhu R

Labels (1)
Tags (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Does you "table" have 3 columns, one called column, one called row1, and one called row2, and one row with the values status, failure and success respectively, or one column called status with two rows, one with failure and the other with success?

What do you want to happen if both are success?

What do you mean by rename? Is this change the value in the field or rename the field/ column?

0 Karma
Get Updates on the Splunk Community!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...