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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...