Hi , I am trying to write a query which compare all field values for a particular field and fetch the results if its not same accordingly with its details. Below is my input : FieldA FieldB ho...
See more...
Hi , I am trying to write a query which compare all field values for a particular field and fetch the results if its not same accordingly with its details. Below is my input : FieldA FieldB host1 26 host2 29 host3 29 I want to compare all field values from fieldB , and if its not same then i want to fetch that count with its fieldA value. eg : here 26 is not equal to other 2 field values , then fieldB value with fieldA values has to be displayed. I tried with if condition | eventstats list(fieldB) as counts | eval value1=mvindex(counts,-2) | eval value2=mvindex(counts,-1) | | eval value3=mvindex(counts,-0) | eval value=if(('value1'=='value2') AND ('value2'=='value3'),"0",""1") Also with below query: |stats dc(metric_value) as count | eval value=if(count>1,"0","1") But with above 2 , i m not able pull its host name where that value is not same. Note: fieldB is dynamic Help me with this !!