Knowledge Management

Renaming fields after transform.conf regex

arrowecssupport
Communicator

We use a transform.conf file with regex to extract the field values. However, the field name in the data input is not in human-readable format. But each value is predictable and we have a reference csv that would allow us to correlate these data together.

uadhshuasdfiuh = Server1
xcoijcxvboijcxvb = Server2

These fields are created on the fly and there are hundreds of them. My question is how would automatically rename these fields, to be more usable in the Splunk ui?

Tags (1)
0 Karma

493669
Super Champion

use FIELDALIAS in props.conf-

FIELDALIAS-<class> = (<orig_field_name> AS <new_field_name>)
  • Use this to apply aliases to a field. The original field is not removed. This just means that the original field can be searched on using any of its aliases.
  • You can create multiple aliases for the same field.
  • <orig_field_name> is the original name of the field.
  • <new_field_name> is the alias to assign to the field.
  • You can include multiple field alias renames in the same stanza.
  • Field aliasing is performed at search time, after field extraction, but before calculated fields (EVAL-* statements) and lookups. This means that: * Any field extracted at search time can be aliased. * You can specify a lookup based on a field alias. * You cannot alias a calculated field.
0 Karma
Get Updates on the Splunk Community!

Exporting Splunk Apps

Join us on Monday, October 21 at 11 am PT | 2 pm ET!With the app export functionality, app developers and ...

Cisco Use Cases, ITSI Best Practices, and More New Articles from Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...