Splunk input transform Icon Splunk input

Description

The Splunk input transform runs a Splunk search query and returns the result as a set of Hop fields

Check the Splunk Connection docs for more information about creating a Splunk connection.

Options

Option Description

Transform name

Name of the transform.

Splunk Connection

The Splunk connection to use

Query

The Splunk search query to run

Returns

The list of fields returned by the Splunk query:

  • Field name: the field name to store as an output field for this transform

  • Splunk name: the field name (key) returned by the Splunk search

  • Return type: search result field data type

  • Length: length of the result field

  • Format: format for the result field

Samples

The samples project has transforms/splunk-input.hpl, which gets the 10 most recent events of the index _internal, where Splunk logs its own activity, and returns their time, host, source and source type. Its Splunk connection splunk uses the variables SPLUNK_HOST, SPLUNK_PORT, SPLUNK_USER and SPLUNK_PASSWORD: set them before you run it. Hop checks the certificate of the server: the default certificate of Splunk is not signed by a public certificate authority, so add it to the truststore of the Java that runs Hop.