Splunk Search

any way to create an alternate name or alias for an index?

mrjlam
Engager

Is there a way to create an alias to an existing index so we can search by its name and it's alias:

eg.
index=original-name
or
index=some-other-name

Jonathan

Tags (1)

lguinn2
Legend

A couple of other ideas:

1 - if you named the indexes something similar, you can use wildcards in the search. For example

index=network*

or

index=*network

2 - You could use tags. So if your indexes are named indexXYZ and ABCindex2, you could tag each of them. If they both contain syslog data, you could create a tag named syslog_index and then search

tag=syslog_index
0 Karma

elof
Path Finder
0 Karma

joebensimo
Path Finder

I want this too. We have standard naming conventions known and used to query via the search app, or selected programmatically in dashboard code, for summary indexes. I have a case in which two summary indexes contain the same data. Rather than duplicate the data or add additional documentation and additional logic to dashboard index addition, I'd like to be able to reference an index by more than one name.

0 Karma

lguinn2
Legend

No,

but I guess that you could create a macro that did something similar. I doubt that the macro would be very useful, though, depending on why you want to do this.

Are you trying to migrate existing searches, reports, etc. from an old index name to a new one? If so, you could use find + sed on a Linux system to find and replace the old index name in all the saved searches, etc. (Of course, be sure to back up and test before actually doing the replacement!) Ask if you want more details...

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...