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!

Celebrating Fast Lane: 2025 Authorized Learning Partner of the Year

At .conf25, Splunk proudly recognized Fast Lane as the 2025 Authorized Learning Partner of the Year. This ...

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...