Splunk® Enterprise

Admin Manual

Download manual as PDF

Splunk Enterprise version 6.x is no longer supported as of October 23, 2019. See the Splunk Software Support Policy for details. For information about upgrading to a supported version, see How to upgrade Splunk Enterprise.
This documentation does not apply to the most recent version of Splunk. Click here for the latest version.
Download topic as PDF


The following are the spec and example files for searchbnf.conf.


#   Version 6.2.0 
# This file contain descriptions of stanzas and attribute/value pairs
# for configuring search-assistant via searchbnf.conf
# There is a searchbnf.conf in $SPLUNK_HOME/etc/system/default/.  It
# should not be modified.  If your application has its own custom
# python search commands, your application can include its own
# searchbnf.conf to describe the commands to the search-assistant.
# To learn more about configuration files (including precedence)
# please see the documentation located at
# http://docs.splunk.com/Documentation/Splunk/latest/Admin/Aboutconfigurationfiles

# Use the [default] stanza to define any global settings.
#     * You can also define global settings outside of any stanza, at the top of the file.
#     * Each conf file should have at most one default stanza. If there are multiple default
#       stanzas, attributes are combined. In the case of multiple definitions of the same
#       attribute, the last definition in the file wins.
#     * If an attribute is defined at both the global level and in a specific stanza, the
#       value in the specific stanza takes precedence.

    * This stanza enables properties for a given <search-command>.
    * A searchbnf.conf file can contain multiple stanzas for any
      number of commands.  * Follow this stanza name with any number
      of the following attribute/value pairs.
    * If you do not set an attribute for a given <spec>, the default
      is used. The default values are empty.
    * An example stanza name might be "geocode-command", for a
      "geocode" command.
    * Search command stanzas can refer to definitions defined in
      others stanzas, and they do not require "-command", appended to
      them.  For example:

      syntax = geocode <geocode-option>*
      syntax = (maxcount=<int>) | (maxhops=<int>)

# The possible attributes/value pairs for searchbnf.conf

SYNTAX = <string>
    * Describes the syntax of the search command.  See the head of
      searchbnf.conf for details.
    * Required


    * Optional simpler version of the syntax to make it easier to
      understand at the expense of completeness.  Typically it removes
      rarely used options or alternate ways of saying the same thing.
    * For example, a search command might accept values such as
      "m|min|mins|minute|minutes", but that would unnecessarily
      clutter the syntax description for the user.  In this can, the
      simplesyntax can just pick the one (e.g., "minute").

ALIAS = <commands list>
    * Alternative names for the search command.  This further cleans
      up the syntax so the user does not have to know that
      'savedsearch' can also be called by 'macro' or 'savedsplunk'.

DESCRIPTION = <string>
    * Detailed text description of search command.  Description can continue on the next line if the line ends in "\"
    * Required

SHORTDESC = <string>
    * A short description of the search command.  The full DESCRIPTION
      may take up too much screen real-estate for the search assistant.
    * Required

EXAMPLE = <string>
COMMENT = <string>
    * 'example' should list out a helpful example of using the search
      command, and 'comment' should describe that example.
    * 'example' and 'comment' can be appended with matching indexes to
      allow multiple examples and corresponding comments.
    * For example:
        example2 = geocode maxcount=4
        command2 = run geocode on up to four values
	example3 = geocode maxcount=-1
        comment3 = run geocode on all values

USAGE = public|private|deprecated
    * Determines if a command is public, private, depreciated.  The
      search assistant only operates on public commands.
    * Required

TAGS = <tags list>
    * List of tags that describe this search command.  Used to find
      commands when the use enters a synonym (e.g. "graph" -> "chart")

RELATED = <commands list>
    * List of related commands to help user when using one command to
      learn about others.

# Optional attributes primarily used internally at Splunk

maintainer, appears-in, note, supports-multivalue, appears-in


#   Version 6.2.0 
# The following are example stanzas for searchbnf.conf configurations. 

# selfjoin
syntax = selfjoin (<selfjoin-options>)* <field-list> 
shortdesc = Join results with itself.
description = Join results with itself.  Must specify at least one field to join on.
usage = public
example1 = selfjoin id
comment1 = Joins results with itself on 'id' field.
related = join
tags = join combine unite

syntax = overwrite=<bool> | max=<int> | keepsingle=<int>
description = The selfjoin joins each result with other results that\
  have the same value for the join fields.  'overwrite' controls if\
  fields from these 'other' results should overwrite fields of the\
  result used as the basis for the join (default=true).  max indicates\
  the maximum number of 'other' results each main result can join with.\
  (default = 1, 0 means no limit).  'keepsingle' controls whether or not\
  results with a unique value for the join fields (and thus no other\
  results to join with) should be retained.  (default = false)

Last modified on 29 October, 2014

This documentation applies to the following versions of Splunk® Enterprise: 6.2.0

Was this documentation topic helpful?

Enter your email address, and someone from the documentation team will respond to you:

Please provide your comments here. Ask a question or make a suggestion.

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