SignalFx Developers Guide

top()

Returns one or more of the largest metrics in the input stream. To control the number of metrics returned, use either the count or percentage arguments.

Syntax

top(count=None, percentage=None, by=None)

Table 1. Parameter definitions
Parameter Type Description

count

integer

Optional, default=None. Number of largest metrics to return. Mutually exclusive with percentage.

percentage

Double between 0.0 (exclusive) and 1.0 (inclusive)

Optional, default=None. Percent of largest metrics to return. Mutually exclusive with count.

by

string or list of strings

Property names to group the results by

Returns a reference to the input stream object.

Examples

1
2
3
4
5
6
7
8
#Top 5 cpu.utilization values
data('cpu.utilization').top(5)

#Top 5 percent cpu.utilization values by 'env'
data('cpu.utilization').top(percentage=.05, by='env')

#Top 10 cpu.utilization values by env and datacenter
data('cpu.utilization').top(10, by=['env', 'datacenter'])

© Copyright 2019 SignalFx.

Third-party license information