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 | What is broken 80% of the time by February?

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

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...