IT Operations Discussions
All the up-time. All the nines.

search license usage with threshold

oliverrojo
Engager

Hi,

I am trying to search for hosts with license usage above 5GB but my search parameter is still showing hosts with usage below 5GB. Please help.

 

index=_internal source="*license_usage.log" h!="idm-*" h!="ip-*" | stats sum(b) as bytes by h | eval GB = round(bytes/1024/1024/1024,1) | rename h as "HOSTNAME" | fields - bytes | sort 30 - G where GB > 5

 

Looks like "where GB > 5"  after the sort isn't working here. 

Tags (1)
0 Karma

aasabatini
Motivator

Hi @oliverrojo 

your search should works but you miss a pipe before the where condition

index=_internal source="*license_usage.log" h!="idm-*" h!="ip-*" | stats sum(b) as bytes by h | eval GB = round(bytes/1024/1024/1024,1) | rename h as "HOSTNAME" | fields - bytes | sort 30 - G | where GB > 5
“The answer is out there, Neo, and it’s looking for you, and it will find you if you want it to.”
0 Karma

oliverrojo
Engager

hi aasabatini,

 

I figured it out... i set my search params below... thanks for your advise!

 

index=_internal source="*license_usage.log" h!="idm-*" h!="ip-*" h!="" h!="UTC*" | stats sum(b) as bytes by h | eval GB = round(bytes/1024/1024/1024,1) | rename h as "HOSTNAME" | fields - bytes | where GB>2 | sort 30 -GB
0 Karma
Get Updates on the Splunk Community!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...