SignalFx Developers Guide

count()

Counts the number of inputs that have data

Syntax

Aggregation

count([by=grp])

Table 1. Parameter definitions
Parameter Type Description

grp

string or array of strings. Default is None.

Name of a property or properties to group the output by. If you want to aggregate you need to specify by=grp.

Transformation

count(over=duration)

Table 2. Parameter definitions
Parameter Type Description

duration

integer. Default is None.

Optional: Duration over which to count inputs.
Durations are specified as a number followed by a single character:

  • s: seconds

  • m: minutes

  • h: hours

  • d: days

The default is None.

Returns a reference to the input stream object.
If you want to transform, you need to specify over=duration.

Examples

1
2
3
4
5
6
7
#Aggregation - count by env
data('cpu.utilization').count(by='env')
#Aggregation - count by env and datacenter
data('cpu.utilization').count(by=['env', 'datacenter'])

#Transformation - count cpu.utilization timeseries that have reported over 1 hour
data('cpu.utilization').count(over='1h')

© Copyright 2019 SignalFx.

Third-party license information