Sum of the merits from two indexes - timelion query

After making the following query in timelion, on one graph I have two lines presenting data.

.es(index='int_20190108', timefield='dt_receipt', metric='sum:ch_id', q='channel:tnthd'),.es(index='test_20190108', timefield='dt_receipt', metric='sum:ch_id', q='channel:tnt')

Now I want to sum them up and I should have one line on the graph, which will sum up the data from these two queries. Is there any possibility of sum values ​​from two indices.

We have two channel names so we want to sum up the value 'tnthd' from the index 'int_20190108' with the value 'tnt' from the index 'test_20190108'

@Anna_F,

Does using the .plus function give you what you're looking for?

.es(index='int_20190108', timefield='dt_receipt', metric='sum:ch_id', q='channel:tnthd').plus(series=.es(index='test_20190108', timefield='dt_receipt', metric='sum:ch_id', q='channel:tnt'))

Yes thanks, I used .sum() - it works too:)

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