- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ddrillic
Ultra Champion
11-21-2017
12:04 PM
How can I get a license usage for one index broken down by sourcetype? I know this question came up recently in different manifestations ; -) sorry.
1 Solution
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

somesoni2
Revered Legend
11-21-2017
12:31 PM
Try this
index=_internal sourcetype=splunkd source=*license_usage.log type=Usage idx=YourIndexHere
| stats sum(b) as usage by idx st | eval usage_MB=round(usage/1024/1024,3)
| rename idx and index st as sourcetype
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

DalJeanis
Legend
11-21-2017
12:37 PM
Start here -
index=_internal source=*license_usage.log* Usage
| eval s=coalesce(s,"unknown"), eval st=coalesce(st,"unknown")
| stats sum(b) as bytes by idx s st
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
micahkemp
Champion
11-21-2017
12:31 PM
index=_internal source="*/license_usage.log" component=LicenseUsage idx=<your index>
| timechart sum(b) AS b BY st
In the license usage events idx
is the index and st
is the sourcetype that the licensing metrics are detailing.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

somesoni2
Revered Legend
11-21-2017
12:31 PM
Try this
index=_internal sourcetype=splunkd source=*license_usage.log type=Usage idx=YourIndexHere
| stats sum(b) as usage by idx st | eval usage_MB=round(usage/1024/1024,3)
| rename idx and index st as sourcetype
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
elliotproebstel
Champion
11-21-2017
12:29 PM
If you find yourself needing to break out license usage statistics often, you might find it helpful to check out the License Usage app, which includes queries for license usage by index/sourcetype/etc.
https://splunkbase.splunk.com/app/174/#/overview
But in particular, this question had a good answer that breaks out license usage by indexname and sourcetype:
https://answers.splunk.com/answers/417031/license-usage-by-source-type.html
