Sum with aggregation


(Ramiafara Voriasy) #1

Hi, I'd like to create a line graph with kibana
here is my log csv :
2018-07-06 10:32:52;Q34QRM;ICaYoB;MSC_MTC;Y1;X1
2018-07-06 10:32:52;uRtEg6;ICaYoB;MSC_MTSMS;Y1;X2
2018-07-06 10:32:52;YCKCRq;ICaYoB;MSC_MOSMS;Y1;X3
2018-07-06 10:32:52;F12r6L;ACaYoA;MSC_MTC;Y2;X4
2018-07-06 10:32:52;ulOEpY;ACaYoA;MSC_MTSMS;Y2;X5
2018-07-06 10:32:53;tP04qj;ACaYoA;MSC_MOSMS;Y2;X6

Y : nb data in and X: nb data out
I'd like to get something like :
data_in = Y1+Y2 not Y1+Y1+Y1+Y2+Y2+Y2
data_out = X1+X2+X3+....+Xn


(Jen Huang) #2

This is easily done with Kibana visualizations using sum aggregations after getting your data indexed into Elasticsearch. Here's an example of 2 sum metrics on one line graph over time:


(Ramiafara Voriasy) #3

thanks,
I'd like to sum and make a request like a "group by" in SQL


(Ramiafara Voriasy) #4

e.g:
x;a
y;b
x;c
y;d
z;e
sum nb_in = x+y+z
sum nb_out = a+b+c+d+e


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.