Splunk Search

Is it possible to find the storage (logs) used by application/services in a particular index for particular time range?

kcliff
Engager

Is it possible to find the storage (logs) used by application/services in a particular index for particular time range? Or something similar

For ex. 

Query:

((index="digconn-timeser-prod") (kubernetes.container_name="*conn-server*")) |

((index="digconn-timeser-qa") (kubernetes.container_name="*conn-server*")) |

 

This would help identify logging  issues from apps/services side over a period of time

Result:

conn-server-latency 1105 GB last 5 days

conn-server-lag 1505 GB last 5 days

 

 

Labels (2)
0 Karma
1 Solution

yuanliu
SplunkTrust
SplunkTrust

Assuming your data contains a field named "application", it would simply be

((index="digconn-timeser-prod") (kubernetes.container_name="*conn-server*"))
| stats sum(eval(len(_raw))) as logsize by application

If you have to derive application from kubernetes.container_name, do something like the following:

((index="digconn-timeser-prod") (kubernetes.container_name="*conn-server*"))
| rex field=kubernetes.container_name "(?<application>conn-server-\w+)"
| stats sum(eval(len(_raw))) as logsize by application

View solution in original post

Tags (1)

yuanliu
SplunkTrust
SplunkTrust

Assuming your data contains a field named "application", it would simply be

((index="digconn-timeser-prod") (kubernetes.container_name="*conn-server*"))
| stats sum(eval(len(_raw))) as logsize by application

If you have to derive application from kubernetes.container_name, do something like the following:

((index="digconn-timeser-prod") (kubernetes.container_name="*conn-server*"))
| rex field=kubernetes.container_name "(?<application>conn-server-\w+)"
| stats sum(eval(len(_raw))) as logsize by application
Tags (1)
Get Updates on the Splunk Community!

Index This | What’s a riddle wrapped in an enigma?

September 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...

BORE at .conf25

Boss Of Regular Expression (BORE) was an interactive session run again this year at .conf25 by the brilliant ...

OpenTelemetry for Legacy Apps? Yes, You Can!

This article is a follow-up to my previous article posted on the OpenTelemetry Blog, "Your Critical Legacy App ...