newrelic()
The newrelic()
function interprets a stream as a metric query that contains a series of slash-separated dimensions.
This method is useful for querying metrics created by New Relic.
Syntax
newrelic(metric [,filter=query][,rollup=rtype][,extrapolation=exmethod][,maxExtrapolations=maxex], **kwargs)
Parameter | Type | Description |
---|---|---|
metric |
string |
Required: A query that’s applied against the metrics in the input stream |
query |
string. Default is |
Optional: query that filters the host dimension in the input stream |
rtype |
string. Default is |
Optional: Specifies the rollup type to use for the metric. If you specify |
exmethod |
string. Default is |
Optional: Specifies how to extrapolate missing data. Use one of the following options:
|
maxex |
integer. Default is |
Optional: The allowed number of extrapolations after the function stops receiving data |
**kwargs |
List of maps |
Optional: List of keywords and values that represents a mapping between New Relic nodes generated from the metric name and SignalFx synthesized dimensions. See Metric names and New Relic nodes. |
Type | Description |
---|---|
|
Average over the rollup duration |
|
Count of points over the rollup duration |
|
Change in value from the previous rollup. Useful for cumulative counters. |
|
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 the <mappings>
argument, the stream object contains
synthesized dimensions.
Metric names and New Relic nodes
When you call newrelic()
on a stream, SignalFx splits the metric name into nodes along forward-slash ('/') boundaries.
For example, the New Relic metric name 'HttpDispatcher/average_response_time/1273567' is split into three nodes:
HttpDispatcher
, average_response_time
, and 1273567
. SignalFx names
these nodes according to the newrelic scheme: node0
is HttpDispatcher
, node1
is average_response_time
, and
node2
is count
.
To change the node naming to your own scheme, use <mappings>
arguments to pass keyword arguments to newrelic()
.
Specify the name you want to use as the keyword, and refer to a newrelic node name by its number: 0
for node0
,
1
for node1
, and so forth. Continuing from the previous example, you can refer to HttpDispatcher
as source
by
specifying source=0
, and you can refer to 1273567
as applicationId
by specifying applicationId=2
.
The following code shows you the full function call:
newrelic('HttpDispatcher/average_response_time/1273567', source=0, applicationId=2)
The strings source
and applicationId
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.
Examples
|
|
© Copyright 2020 Splunk, Inc.
Third-party license information