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!

BSides Splunk 2022 - The Call for Papers is now Open!

TLDR; Main Site: https://bsidessplunk.com CFP Site: https://bsidessplunk.com/cfp CFP Opens: December 15th, ...

Sending Metrics to Splunk Enterprise With the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. The OpenTelemetry project is the second largest ...

What's New in Splunk Cloud Platform 9.0.2208?!

Howdy!  We are happy to share the newest updates in Splunk Cloud Platform 9.0.2208! Analysts can benefit ...