Sumologic 求和搜索查询中的两个聚合

Sumologic sum two aggregates in search query

我想要实现的是将两个聚合字段 sum(DiscoverCountOld) 的总和显示为 VisitsDiscoveredOld 并将 sum(DiscoverCount) 显示为 VisitsDiscovered 作为新列而不是这两个字段

  _source="src" and _collector="collector"
    | parse regex "Finished cataloging (?<DiscoverCountOld>\d+) visits for state " nodrop
    | parse regex "Finished cataloging visits: Visit count: (?<DiscoverCount>\d+)" nodrop
    | parse regex "Finished submitting (?<SubmitCount>\d+) visits for state CO" nodrop
    | parse regex "Finished updating status for (?<UpdateCount>\d+) visits for state CO"
    | fields DiscoverCountOld,DiscoverCount,SubmitCount,UpdateCount
    | timeslice 1d
    | sum(DiscoverCountOld) as VisitsDiscoveredOld,sum(DiscoverCount) as VisitsDiscovered, sum(SubmitCount) as VisitsSubmitted, sum(UpdateCount) as VisitsUpdated group by _timeslice
    | fillmissing timeslice(1d) 
    | sort by _timeslice asc

这是找到的答案:

_source="_source" and _collector="-collector"
| parse regex "Finished cataloging (?<DiscoverCountOld>\d+) visits for state " nodrop
| parse regex "Finished cataloging visits: Visit count: (?<DiscoverCount>\d+)" nodrop
| parse regex "Finished submitting (?<SubmitCount>\d+) visits for state CO" nodrop
| parse regex "Finished updating status for (?<UpdateCount>\d+) visits for state CO"
| timeslice 1d
| sum(DiscoverCountOld) as VisitsDiscoveredOld,sum(DiscoverCount) as VisitsDiscoveredNew, sum(SubmitCount) as VisitsSubmitted, sum(UpdateCount) as VisitsUpdated group by _timeslice
| VisitsDiscoveredOld+VisitsDiscoveredNew as VisitsDiscovered
| fields _timeslice,VisitsDiscovered,VisitsSubmitted,VisitsUpdated
| fillmissing timeslice(1d)   
| sort by _timeslice asc