Splunk Search

Adding strings from 2 fields into 1

Zyon
Engager

Hello!

I am trying to combine 2 fields into 1 field.
One of my field is named date_mday, which stores all the days in the month, 1-30/31
Another field is named date_month, which stores all the month in the year, Jan-Dec

I need to combine these 2 fields into one field. For example, "8 Aug" or "20 Jan".
May i ask if there is any ideas for me to do so?

Thanks.

EDIT
Now, I am able to produce a graph, however is there any way for me to sort the time?
Graph: http://i40.tinypic.com/2ai0zzn.png

Tags (1)
0 Karma
1 Solution

rturk
Builder

Hi Zyon,

try this:

<search here> | eval date_readable=date_mday." ".date_month

You have to remember that this will just be a string and Splunk will not treat it as a date for the purposes of sorting.

Hope this helps 🙂

View solution in original post

rturk
Builder

Hi Zyon,

try this:

<search here> | eval date_readable=date_mday." ".date_month

You have to remember that this will just be a string and Splunk will not treat it as a date for the purposes of sorting.

Hope this helps 🙂

Zyon
Engager

Alright. Thanks a lot.

0 Karma

rturk
Builder

This sounds like an issue with timestamp extraction in the original event. Unfortunately I can't help you right now, but if you put another question up, I think someone will be able to assist you shortly!

0 Karma

Zyon
Engager

Alright! But i have another doubt and have no idea on how it could be done. It is asked above.

0 Karma

rturk
Builder

Great! If you could mark the answer as accepted (the tick box) that'll help other people who are searching with the same problem 🙂

Happy Splunking!

0 Karma

Zyon
Engager

Thanks, it works!

0 Karma
Get Updates on the Splunk Community!

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...