I've created a custom index that I want to be my new defaultdb. Currently, my defaultdb is "main" index. I want all events without an index specified to be funneled to my new custom db. How do I do this?
Out-of-the-box, defaultdb is set to main. To change this, edit your indexes.conf file to reflect the new default index. If you have a new index called "badger", set the following at the top (global setting):
defaultDatabase = badger
From indexes.conf.spec:
defaultDatabase = <database name>
* If no index is specified during search, Splunk searches default database.
* Also the database displays by default on the homepage.
* Defaults to main.
You can do this by going to roles in the GUI under users and authentication (Version 8.0.1). Then find the role for the group of users and click the indexes tab. Under there you will see a default column you can check to set the default index(s).
Even if you change the default index as per the above instructions, this wouldn't be the 'default' index, until you granted access by adding the index to 'Indexes searched by default' under Manager » Access controls » Roles » . After that point, it would be searched by default, as smisplunk indicates above.
The default index above refers specifically to which index data is funneled to when an index is not specified for the datasource. But you are correct that there is a separate configuration that would need to be modified for searching if you want that index to also be the default SEARCH index.
If you meant the "default" index in terms of which index(es) are searched if no "index=" clause is provided in the search string, that can be done on a per-user basis from the manager (it sets srchIndexesDefault values in authorize.conf for the given role).
Out-of-the-box, defaultdb is set to main. To change this, edit your indexes.conf file to reflect the new default index. If you have a new index called "badger", set the following at the top (global setting):
defaultDatabase = badger
From indexes.conf.spec:
defaultDatabase = <database name>
* If no index is specified during search, Splunk searches default database.
* Also the database displays by default on the homepage.
* Defaults to main.