Installation

Trending license usage

rmorlen
Splunk Employee
Splunk Employee

We have a summary index where we collect daily license usage. We have a chart that can show me the daily usage for the last few months.

I would like to have a trendline that shows the usage over the past few months. I would like to only include Monday-Friday (or only exclude weekends).

I chart the following (summary_admin is our summary index):

index=summary_admin earliest=-4mon@mon latest=@d | timechart useother="f" span=1d max(GB) by orig_sourcetype | addtotals fieldname=GBTotal | timechart span=1w avg(GBTotal) as "Average", max(GBTotal) as "Max", min(GBTotal) as "Min"

Does ok but would be better by eliminating weekends. (I also need to tweak the span options.)

Thanks.

0 Karma

yannK
Splunk Employee
Splunk Employee

check the automatic date fields like date_wday
and use it as an eval or where condition to exclude or turn into zero.

| eval GB=if(date_wday="saturday" OR date_wday="sunday",0)

0 Karma

rmorlen
Splunk Employee
Splunk Employee

Thanks for the input. Setting the values for Sat and Sun to 0 skew the averages, min, and max. I really want to completely ignore them.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...