Splunk Search

How to remove the VALUE attached to a word with _ before the name

coleman07
Path Finder

I have the following search string which I use to create a line chart:

....| timechart span=1d sum(kb) by series

The results and the graph show VALUE_internal and VALUE_audit. I just want _internal and _audit. How do I remove the VALUE so my results are less confusing?

Thanks.

Tags (2)
0 Karma

melting
Splunk Employee
Splunk Employee

Fields with a leading "_" (underscore) are hidden fields. I would guess this is why the "VALUE" is prepended to this field is so it would not stay hidden. You could use the rename command, but you would have to choose something that is not preceded with an underscore.

| rename VALUE_audit as -audit
0 Karma

coleman07
Path Finder

VALUE is getting appended to _internal and _audit. I ran the following search command and got the following output:

index=_internal source=metrics.log group=per_index_thruput series!=summary | count by series -- this shows _metric and _internal. When I run this thru timechart as above, VALUE is appended - try it.

0 Karma

sdaniels
Splunk Employee
Splunk Employee

Hard to understand exactly what you are looking for. Are the x & Y access titles showing this? Or is this actual values that are displayed in the legend?

You can use eval with the trim function to remove VALUE off of your field values like this:

| eval myField = trim(series , "VALUE") | timechart span=1d sum(kb) by myField

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...