After a The splunk+R search ,
index=pqr host=xyz* NOT TYPE="*ABCDE*" | fields X, Y |timechart limit=0 span=10m count, avg(X) by Y | r " input = data . . . calculations . . . output =mydataframe"
output is nothing but a dataframe that looks like this (dummy values)
V1 V2 A B C
1 2 3 4 5
3 4 2 5 4
1 2 0.5 1 1 2
The operations i want to do are :
D$Result1 <- ifelse(D$A > 0.05 & D$B > 0.05, "Equal", "")
D$Result2 <- ifelse(D$A < 0.05 & D$B > 0.05 & D$C < 0, "Slower", "")
D$Result3<-ifelse(D$A=0.05& D$B> 0.06 & D>0, "Faster", "" ) ,. . . so on
so that I arrive at (look at first image)
and then combine intermediate results into a final results column
D$Result <- paste(D$Result1, D$Result2,
D$Result3,
sep = "") and arrive at (look at second image)
How do I achieve this in Splunk using Splunk's search processing language?
This is the sample input and output from R Studio:
From the above I want to arrive at this : (Displaying only final and required results):
... View more