I do charge back for Splunk at $WORK. This is the process I've developed to present the information to the respective data owners and to my administration team. I have a lookup table which contains the name of the index with the expected daily ingestion (a.k.a. "what they paid for"). The lookup table looks like this:
"daily_limit",idx
,"_audit"
,"_internal"
,"_introspection"
"0.002",bidata
,"anomaly_detection"
"1.5",app
1,array
"1.4",avaya
Then I have a scheduled report run every morning to generate a report with the daily usage versus what their limits.
index=_internal source=*license_usage.log type="Usage" idx=* pool="Production" | bucket span=1d _time | stats sum(b) as b by _time idx | eval daily_usage_mb=b/1024/1024 | lookup index_limits idx OUTPUT daily_limit as daily_limit_gb | eval daily_limit_mb=daily_limit_gb*1024 | eval warning=daily_limit_mb*.8 | eval Alert=case(daily_usage_mb>=daily_limit_mb, "1 overage", daily_usage_mb>=warning, "2 warning", 1==1, "3 ok") | table idx Alert daily_limit_mb daily_usage_mb | sort Alert, idx | fieldformat daily_usage_mb=tostring(daily_usage_mb,"commas") | fieldformat daily_limit_mb=tostring(daily_limit_mb,"commas")
In order to provide the same data to the data owners, I create a summary search of the license usage that I can present to the data owners.
index=_internal source=*license_usage.log type="Usage" idx=* | eval idx=if(len(idx)=0 OR isnull(idx),"(UNKNOWN)",idx) | stats sum(b) as volumeB by idx, pool| eval volumeMB=round(b/1024/1024,3)
I also provide an alert to the data owners if their usage the previous day exceeds 80% of their usage.
index=summary search_name="Summarize Daily License Usage by Index" idx=app| eval volumeMB=round(volumeB/1024/1024,3) | lookup index_limits idx OUTPUT daily_limit | timechart span=1d sum(volumeMB) avg(eval(daily_limit*1000)) as daily_limit_MB
And finally I also provide a report to each group for them to monitor their 30 day usage against their expected daily ingestion:
index=summary search_name="Summarize Daily License Usage by Index" idx=app| eval volumeMB=round(volumeB/1024/1024,3) | lookup index_limits idx OUTPUT daily_limit | timechart span=1d sum(volumeMB) avg(eval(daily_limit*1000)) as daily_limit_MB
Hope that helps.
Jim
... View more