I did it 😄
| eval signature=if(like(signature,"%orrent%"),"Torrent events", signature)
| eval signature=if(like(signature, "%DNS%"), "DNS events", signature)
Try this one.
index="test_index" sourcetype="usecase1_csv"
| table signature count
| eval signature=substr(signature,1,1)
| stats list(count) as count by signature
| stats sum(count) as sum by signature
it will work if I have the same (duplicates) values, no?
For example, I have 5 values that have similar context and I want them united as one:
signature |
Jonh is eating |
Sara is eating |
Josh is eating |
Dog |
Cat |
Should be like this:
signature |
Human |
Animals |
| makeresults
| eval _raw="signature
Jonh is eating
Sara is eating
Josh is eating
Dog
Cat"
| multikv forceheader=1
| rename COMMENT as "this is your sample. from here, the logic"
| rex field=signature "(?<type>\S+)(?<other>.*)?"
| eval category=if(other="","animal","human")
| stats count by category
| rename category as signature
Is this the same as the first question?
Nope.
Okay, I see there is a lot of misunderstanding. I changed my post (:
I did it 😄
| eval signature=if(like(signature,"%orrent%"),"Torrent events", signature)
| eval signature=if(like(signature, "%DNS%"), "DNS events", signature)
Hi rich!
It's different values, but they have one common keyword.
Also, there will be cases in future when I need to united different values without common keyword as one.