简体   繁体   中英

Nesting aggregate functions in Librato

I have 3 measures, and I want to add measure1 and measure2 and then subtract measure3 from the result. I'm unable to get the composite metric below to work. Any help would be appreciated.

subtract([
    sum([
        sum(s("measure1", "*")),
        sum(s("measure2", "*")),
    ]),
    sum(s("measure3", "*"))
])

Figured out what the issue was. Missing the aggregate function within the series.

subtract([
    sum([
        s("measure1", "*", {function:"sum"}),
        s("measure2", "*", {function:"sum"})
    ]),
    s("measure3", "*", {function:"sum"})
])

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM