Skip to main content

sum Metrics Operator

The sum operator calculates the sum of the metrics values that match the query. If grouping is specified, it calculates the sum for each group.

Syntax

sum [by FIELD [, FIELD, ...]]

Examples

Sum the value of a metric 

This query calculates the total of the CPU_Sys metric values across all time series whose dep tag equals “prod”.

dep=prod metric=CPU_Sys | sum

Sum the value of a metric by one field 

This query calculates the total of the CPU_Sys metric values across all time series whose dep tag equals “prod” by node.

dep=prod metric=CPU_Sys | sum by node
Legal
Privacy Statement
Terms of Use

Copyright © 2024 by Sumo Logic, Inc.