Splunk Search

How to rename field with * inside like: Service*

buzek
Explorer

Hi

I need to rename a field name (from lookup csv) with special character inside, like:
Service*
Status+

the problem is the: *

inputlookup file.csv | rename "Service*" as service

... does not work. how can i tell splunk to ignore the * as "wildcard"?

thanks

Tags (2)
0 Karma
1 Solution

to4kawa
Ultra Champion
| stats count
| rename count as "Status*"
| eval status='Status*'
| fields status

Hi, this is sample query.

| inputlookup file.csv 
| eval  service='Service*'
| fields - Service*

How about this?

View solution in original post

kartm2020
Communicator

Can you please try the below.

inputlookup file.csv | rename 'Service*' as service

Instead of using '' please use '

0 Karma

buzek
Explorer

thank you
| rename 'Service*' as service

does not work.

the solution at the end (thanks to to4kawa) is:

|inputlookup report.csv 
 | rename count as "Status*"
 | eval status='Status*'
0 Karma

to4kawa
Ultra Champion
| stats count
| rename count as "Status*"
| eval status='Status*'
| fields status

Hi, this is sample query.

| inputlookup file.csv 
| eval  service='Service*'
| fields - Service*

How about this?

buzek
Explorer

thank you so much to4kawa!

this helps:

|inputlookup report.csv 
 | rename count as "Status*"
 | eval status='Status*'

have a good day and thanks

0 Karma

buzek
Explorer

Hi

at the end, this works fine:

|inputlookup report.csv 
 | rename count as "Status*"
 | eval status='Status*'

thank you so much

0 Karma

to4kawa
Ultra Champion

your welcome, Happy Splunking.

0 Karma

begleyj1
Path Finder

If you just need to change the column name, look at installing the Lookup Editor https://splunkbase.splunk.com/app/1724/. If the lookup is larger than 10 mb and you don't need the field names, I would just re-upload the lookup with the fields you want.

0 Karma

buzek
Explorer

thank you - i can just upload the report as "user" - in settings/lookups - therefore not able to rename column during import (like when splunk is locally installed).

0 Karma
Get Updates on the Splunk Community!

Improve Your Security Posture

Watch NowImprove Your Security PostureCustomers are at the center of everything we do at Splunk and security ...

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...