Splunk Search

We want to get license usage by a _meta field ServerRole?

Arpit_S
Path Finder

The license usage logs are present under an index ABC, but in inputs.conf in which the _meta field is present sends data to different index winsec.

Will the below query provide the exact license usage?

index=winsec | eval b=len(_raw) |eval GB=(b/(1024*1024*1024)) | stats sum(GB)

0 Karma

mdsnmss
SplunkTrust
SplunkTrust

For getting license usage of a specific index I would recommend using the license_usage.log in the _internal index. Here is a recommended search:

index=_internal source=*license_usage.log type="Usage"    | eval indexname = if(len(idx)=0 OR isnull(idx),"(UNKNOWN)",idx)   | eval sourcetypename = st   | stats sum(b) as b by _time, indexname, sourcetypename | eval GB=(b/1024/1024/1024)  | fields _time, indexname, sourcetypename, GB | search indexname=* sourcetypename=* | stats sum(GB)

You can change the filters to hit specific sourcetypes or indexes. You can add host/source metadata to the search but those values run the risk of being squashed in license_usage.log and may not be present in every event. The reason h or s may not be present in all events is described well here: https://answers.splunk.com/answers/48542/blank-h-and-s-in-license-usage-log.html

0 Karma

Arpit_S
Path Finder

The above query will only work and provide license usage using _internal index. But the input is coming to different indexes.

But, we need to group the hosts by the _meta field and find the license usage of each group. Is it possible to calculate license usage using the _meta field added to every host in the configuration?

0 Karma

adonio
Ultra Champion

this will look at the length of the raw data in winsec index
if all your data goes only to that index (not the internal splunk data) than it will be pretty accurate.
will highly recommend to go back to default and use the license master correctly

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

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