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!

Index This | When is October more than just the tenth month?

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

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What’s New & Next in Splunk SOAR

 Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us for an ...