Splunk Search

help with timechart / count needed

damucka
Builder

Hello,

I would like to track the license consumption as from time to time it is 4 times higher (per day) than expected. I suspect this is because our systems are in the QEC phase and produce more logs, e.g. after someone activates additional traces/debug mode.
I am identifying the file / source type responsible for the growth using the following:

index=si_license_usage idx="mlbso" st=BWP_hanatraces | eval Gb=round(b_hourly/1024/1024/1024,12)  | bucket span=1d _time |sort -b_hourly

What comes out is that the files with the pattern indexserver are causing the most consumption. This is expected.
As they have restricted size, I would be now interested to see how often they are written / transferred to Splunk.
So I thought I would use sth. like below to get the chart of the distinct files / sources per hour:

| metadata type=sources index=mlbso sourcetype=BWP* | search source="*indexserver*" | timechart span=1h count

but the last part with timechart does not return any result, so I guess I do sth wrong.
Could you please help?

Kind Regards,
Kamil

Tags (1)
0 Karma

FrankVl
Ultra Champion

| metadata does not return an _time field. So without any further tricks, you cannot do a timechart on that. You would need to rename the relevant time field from the | metadata output to _time, before doing the timechart.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...