Admin Manual

 


About the Splunk Admin Manual
How Splunk Works

FIFO inputs

This documentation does not apply to the most recent version of Splunk. Click here for the latest version.

FIFO inputs

Caution: Data sent via FIFO is not persisted in memory and can be an unreliable method for data sources. To ensure your data is not lost, use monitor instead.


Splunk Web

Add inputs from FIFOs via Splunk Web.

1. Click Admin in the upper right-hand corner of Splunk Web.

2. Then click Data Inputs.

3. Pick files and directories.

4. Click New Input to add an input.

5. Under Source, type in the path to the FIFO.

6. Under the Host heading, accept the default host name or enter a new hostname/IP address. Learn more about setting host value.

Note: Host only sets the host field in Splunk. It does not direct Splunk to look on a specific host on your network.

7. Now set the Source Type. Source type is a default field added to events. Source type is used to determine processing characteristics such as timestamps and event boundaries. Learn more about setting source type. Choose:

8. After specifying the source, host, and source type, click Submit.


CLI

Add a FIFO via Splunk's Command Line Interface (CLI). To use Splunk's CLI, navigate to the $SPLUNK_HOME/bin/ directory and use the ./splunk command. Or add Splunk to your path and use the splunk command.

If you get stuck, Splunk's CLI has built-in help. Access the main CLI help by typing splunk help. Individual commands have their own help pages as well -- type splunk help <command>.

The following commands are available for input configuration via the CLI:

Command Command syntax Action
add add fifo $SOURCE [-parameter value] ... Add inputs from $SOURCE.
edit edit fifo $SOURCE [-parameter value] ... Edit a previously added input for $SOURCE.
remove remove fifo $SOURCE Remove a previously added $SOURCE.
list list fifo List the currently configured $SOURCE.


Parameter Required? Description
source Required Path to a FIFO or named pipe to index.
sourcetype Optional Specify a sourcetype field value for events from the input source.
index Optional Specify the destination index for events from the input source.
hostname Optional Specify a host name to set as the host field value for events from the input source.
hostregex Optional Specify a regular expression on the source file path to set as the host field value for events from the input source.
hostsegmentnum Optional Set the number of segments of the source file path to set as the host field value for events from the input source.

Example

This example shows how to enable a FIFO input, then set the host and sourcetype.

1. Add the FIFO /var/run/syslogfifo and set the sourcetype to linux_messages_syslog.

./splunk add fifo /var/run/syslogfifo -sourcetype linux_messages_syslog

2. Edit the input configuration to set the host to web01.

./splunk edit fifo /var/run/syslogfifo -hostname web01


inputs.conf

To add an input, add a stanza for it to inputs.conf in $SPLUNK_HOME/etc/system/local/, or your own custom application directory in $SPLUNK_HOME/etc/apps/. If you have not worked with Splunk's configuration files before, read how configuration files work before you begin.

You can set any number of attributes and values following an input type. If you do not specify a value for one or more attributes, Splunk uses the defaults that are preset in $SPLUNK_HOME/etc/system/default/ (noted below).

[fifo://<path>]

This input stanza type directs Splunk to read from a FIFO at the specified path.

host = <string>

index = <string>

sourcetype = <string>

source = <string>

queue = <string> (parsingQueue, indexQueue, etc)

This documentation applies to the following versions of Splunk: 3.3 , 3.3.1 , 3.3.2 , 3.3.3 , 3.3.4 , 3.4 , 3.4.1 , 3.4.2 , 3.4.3 , 3.4.5 , 3.4.6 , 3.4.8 , 3.4.9 , 3.4.10 , 3.4.11 , 3.4.12 , 3.4.13 , 3.4.14 View the Article History for its revisions.


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

Was this documentation topic helpful?

If you'd like to hear back from us, please provide your email address:

We'd love to hear what you think about this topic or the documentation as a whole. Feedback you enter here will be delivered to the documentation team.