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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...