SignalFx Developers Guide


graphite() creates a stream that interprets its input query as a series of period-separated dimensions. Use graphite() to query metrics created by graphite.


graphite(metric [,rollup=rtype][,extrapolation=extype][,maxExtrapolations=maxex], **kwargs)

Table 1. Parameter definitions
Parameter Type Description



A query that specifies the metrics to add to the output stream. Allows the following expressions:

  • Wildcards using the '*' character

  • Character classes using [ and ]. This is the same as character classes used in Perl regular expressions.

  • Value lists using { and }. For example, the query {host,server,machine} selects host, server, or machine.


string. Default is None.

Optional: Type of rollup to use on the metric. Specify None to use the default rollup for the metric. You can also specify a value listed in the Rollup type table. Default is None


string. Default is "null".

Specifies how to extrapolate missing data. Use one of the following options:

  • "null": Default Don’t supply missing data

  • "zero": Substitute the value 0 for missing data

  • "last_value": Use the last non-missing data value



The allowed number of extrapolations after the function stops receiving data. The default is -1.


One or more named arguments and values

Mappings between graphite nodes generated from the metric name and SignalFx synthesized dimensions. See Metric names and graphite nodes

Table 2. Rollup types
Type Description


Average over the rollup duration


Count of points over the rollup duration


Change in value from the previous rollup


Latest value received. Useful for gauges.


Max value in the rollup duration. Useful for cumulative counters.


Minimum value in the rollup duration. Useful for gauges.


Speed that points arrive.


Sum over the rollup. Useful for distributed counters


The lag in ingesting the timeseries for each timeslice

Returns a stream object. If you specify values for the <mappings> argument, the stream object contains synthesized dimensions.

Metric names and graphite nodes

When you call graphite() on a stream, SignalFx splits the metric name into nodes along period ('.') boundaries. For example, the graphite metric name 'api.login.count' is split into three notes: api, login, and count. SignalFx names these nodes according to the graphite scheme: node0 is api, node1 is login, and node2 is count.

To change the node naming to your own scheme, use the <map> argument to pass keyword arguments to graphite(). Specify the name you want to use as the keyword, and refer to a graphite node name by its number: 0 for node0, 1 for node1, and so forth. Continuing from the previous example, you can refer to api as serverType by specifying serverType=0, and you can refer to login as apiType by specifying apiType=1. The following code shows you the full function call:

graphite('api.login.count', serverType=0, apiType=1)

The strings serverType and apiType are known as synthesized dimensions. You can use them to group output streams using the by= argument, and they appear as dimensions in the output stream.


#Start a stream containing all MTS with the metric 'api.login.count'
#Dimensions are node0=api, node1=login, and node2=count

#Start a stream containing all MTS with metrics that are api counts
#Dimensions are node0=api, node1=apiType, node2=count

#Provide synthesized dimensions for a node. The first and third node retain their default names
#Dimensions names become node0=api, apiType=apiType, node2=count
graphite('api.*.count', apiType=1)

© Copyright 2020 Splunk, Inc.

Third-party license information