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 WebAdd 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.
CLIAdd 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. |
Required parameters
| source | Path to a FIFO or named pipe to index. |
Optional parameters
| sourcetype | Specify a sourcetype field value for events from the input source. |
| index | Specify the destination index for events from the input source. |
| hostname | Specify a host name to set as the host field value for events from the input source. |
| hostregex | Specify a regular expression on the source file path to set as the host field value for events from the input source. |
| hostsegmentnum | Set the number of segments of the source file path to set as the host field value for events from the input source. |
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
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>]
host = <string>
index = <string>
sourcetype = <string>
source = <string>
queue = <string> (parsingQueue, indexQueue, etc)
Comments
No comments have been submitted.