Splunk® Data Stream Processor

Function Reference

Acrobat logo Download manual as PDF

Acrobat logo Download topic as PDF

Send data to SignalFx (metric)

Send metric data to a SignalFx endpoint. See Create a connection to SignalFx for more information about creating a SignalFx connection.

This is a connector-based function. To use it, you must first create a SignalFx connection. Use that connection_id as an argument for this function.

Function input schema

collection<record<R>>
This function takes in collections of records with schema R.

Required arguments

connection_id
Syntax: string
Description: The SignalFx connection ID.
Example: "576205b3-f6f5-4ab7-8ffc-a4089a95d0c4"
metric_name
Syntax: expression<string>
Description: The SignalFx metric name.
Example: "my_metric_name"
metric_value
Syntax: expression<double>
Description: The SignalFx metric value.
Example: 0.33
metric_type
Syntax: expression<string>
Description: The SignalFx metric type. This can be set to:
  • COUNTER
  • CUMULATIVE_COUNTER
  • GAUGE

This argument is case-sensitive and must be uppercase.

Example: "COUNTER"

Optional arguments

metric_timestamp
Syntax: expression<long>
Description: The time associated with the SignalFx metric, measured in milliseconds. If a timestamp is not available, the ingest time is used as the timestamp
Example: 1583864717233L
metric_dimensions
Syntax: expression<map<string, string>>
Description: Defaults to empty { }. JSON key-value pairs that describe a SignalFx metric.
Example: {"my_dimension": "1"}
parameters
Syntax: map<string, string>
Description: Defaults to empty { }. Key-value pairs that can be passed to SignalFx. This can be set to:
  • batch_size: The maximum number of elements to flush. The batch size can range between 50 and 25,000 elements. The default value is 2000.
  • batch_interval_msecs: The maximum time to wait before flushing. The batch size interval can range between 50 and 100,000 milliseconds. The default value is 2000.
Example: batch_size = 20000

SPL2 example

You can write the function by listing the arguments in this exact order.

...| into signalfx("connection_id", "my_metric_name", 0.33, "COUNTER", 1583864717233L, {"my_dimension": "1"}, {"batch_size": "20000", "batch_interval_msecs": "10000"});

Alternatively, you can use named arguments in any order and leave out optional arguments you don't want to declare. All unprovided arguments use their default values. See SPL2 syntax for more details. The following example declares only the parameters optional argument.

...| into signalfx("connection_id", "my_metric_name", 0.33, "COUNTER", parameters: {"batch_size": "20000", "batch_interval_msecs": "10000"});

Port requirements

The Send Metrics Data to SignalFx function sends HTTP requests to the SignalFx endpoint via a dynamic or ephemeral port. Your local firewall configuration must be set up to allow outgoing HTTP traffic from at least one of the ports in the range of dynamic or ephemeral ports allocated by your operating system. These ports typically range from 49152 to 65535, but this can be different depending on the specific operating system you are using.

Last modified on 10 November, 2020
PREVIOUS
Send data to Microsoft Azure Event Hubs (Beta)
  NEXT
Send data to SignalFx (trace)

This documentation applies to the following versions of Splunk® Data Stream Processor: 1.2.0


Was this documentation topic helpful?

You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters