Hi @nsantiago17 ,
Some sample data would be helpful, along with how you would like to the report/table to look. Some questions:
What is TNeg_eqt? What is TNeg_drv? What is the unique value for these events (transaction ID, line number, serial number, etc)? Why are you using dedup?
I would use something like this:
( index=BI_1 sourcetype=jobs_info fieldJ IN (Flamengo) ) OR
( index=BI_2 sourcetype=tel_drv )
| eventstats sum(TNeg_eqt) as TNeg_eqtSum sum(TNeg_drv) as TNeg_drvSum
This search will show the sum of each value as an additional field. If you just want the total sum and no other information, you could use stats:
( index=BI_1 sourcetype=jobs_info fieldJ IN (Flamengo) ) OR
( index=BI_2 sourcetype=tel_drv )
| stats sum(TNeg_eqt) as TNeg_eqtSum sum(TNeg_drv) as TNeg_drvSum
If the fields are named differently between indexes, you would use an eval to create the regular field:
( index=BI_1 sourcetype=jobs_info fieldJ IN (Flamengo) ) OR
( index=BI_2 sourcetype=tel_drv )
| eval TNeg_eqt = case(index=="BI_1", TNeg_eqt_BI_1, index=="BI_2", neg_BI_2)
| eval TNeg_drv = case(index=="BI_1", TNeg_drv_BI_1, index=="BI_2", drv_BI_2)
| stats sum(TNeg_eqt) as TNeg_eqtSum sum(TNeg_drv) as TNeg_drvSum
Without knowing more about your data, it's hard to provide an accurate answer.
Also, when you do a | stats sum(x) by _time you're usually only going to end up with the same number in the stats calculation because _time will most likely be unique, unless you're using bucket or bin .
... View more