Splunk Search

How to chart sum(value) by date ?

afourdraine
New Member

Hi,

I got some raw data like :

Backup-ID: host1.domain.fr_1
Fragment Size (KB): 4425792
Expires: 20/03/2015
MediaID: AZER12

Extracted fields :
fragment_size : "(KB) 4425792"
date : "20/03/2015"

I'd like to get a chart of the sum(fragment_size) by date

I've tried many combinations with sum(value), stats, chart etc, but it seems that I missed something because I can't get a result.

Can you help me?

Alex.

Tags (3)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Your fragment_size is not a number. Either extract the number without the "(KB: )" in front, or do some replacing and multiplying-by-unit afterwards.

martin_mueller
SplunkTrust
SplunkTrust

regex is a filtering command, try rex field=fragment_size "(?\d+) instead.

Once that works, fix your initial field extractions to extract the correct number in the first place.

afourdraine
New Member

Yep, i've tried with |regex fragment_size="\d+" but still, the sum was null

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

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 ...