size()
Was this page helpful?
Counts the number of metrics in each MTS in the input stream
Syntax
Aggregation
size([by=grp])
Parameter definitions
Parameter | Type | Description |
---|---|---|
allow_missing | boolean | Optional. False by default. See Handling missing metadata for more details. |
by=<grp> | a string or list of strings | Optional. None by default. Names of properties to group by. |
Transformation
size([over=duration])
Parameter definitions
Parameter | Type | Description |
---|---|---|
over | Duration (number and duration units) Durations are specified as a number followed by a single character: s: seconds m: minutes h: hours d: days The default is None. | Optional: Duration over which to get the number of input metrics |
Both forms return a data stream.
Examples
#Aggregation - size by env data('cpu.utilization').size(by='env') #Aggregation - size by env and datacenter data('cpu.utilization').size(by=['env', 'datacenter']) #Transformation - count all(reporting or not) cpu.utilization timeseries #in the system data('cpu.utilization').size(over='1h')