Splunk Search

License usage by Host

vpantangi
Explorer

Hi,
I can see the license usage of hosts in my environment by using this query:

index=_internal source=*license_usage.log type=Usage
 | stats sum(b) AS Bytes by h
 | eval GB = Bytes/1024/1024/1024
 | rename h as host
 | table host GB
 | sort -GB
 | addcoltotals

but i have to calculate only the license usage of dev environment hosts, i have created a lookup as dev.csv, but i am not sure how to get only the license usage of hosts in that lookup file.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try this.

index=_internal source=*license_usage.log type=Usage [|inputlookup dev.csv | fields host | format]
| stats sum(b) AS Bytes by h
| eval GB = Bytes/1024/1024/1024
| rename h as host
| table host GB
| sort -GB
| addcoltotals

---
If this reply helps you, an upvote would be appreciated.
0 Karma

vpantangi
Explorer

No results found.

0 Karma