- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aliased Search Command Results In "Unknown Search Command 'my'"
kkirsche
Engager
07-21-2015
01:26 PM
Hey,
I have the following in my searchbnf.conf
file but thus far I get an error when trying to use the alias:
[mycommand-command]
syntax = mycommand field=<field> db="<database>,<database>"
simplesyntax = mycommand field=<field> db=<database>
alias = my
shortdesc = Short Description
description = Description
comment1 = Description1
example1 = * | mycommand field=ex_field db=ex_db
comment2 = Description2
example2 = * | mycommand field=ex_field db="ex_db1,ex_db2"
category = fields::add
appears-in = 6.2.3
maintainer = Kevin Kirsche
usage = public
related = stats
tags = tags
Any reason that when trying to use the alias I get the following:
Command:
* | my field=ex_field db=ex_db
Unknown search command 'my'.
Any idea why this could / would not work?
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
martin_mueller
![SplunkTrust SplunkTrust](/html/@E48BE65924041B382F8C3220FF058B38/rank_icons/splunk-trust-16.png)
SplunkTrust
07-21-2015
02:01 PM
The alias defined in searchbnf.conf only matters for the in-line help displayed under the search bar - it doesn't actually influence commands.conf. I don't see an example in default Splunk, but I guess you'd have to define your command twice there since there seems to be no alias mechanism in commands.conf 😞
![](/skins/images/53C7C94B4DD15F7CACC6D77B9B4D55BF/responsive_peak/images/icon_anonymous_message.png)