Reporting

How to get avg license per host for specific indexes

a212830
Champion

I have a request to determine the average license usage per host, for a few selected indexes, on a daily basis. Is there a way to do this?

0 Karma

harsmarvania57
Ultra Champion

Hi,

Use below query to find per day license for every host which is sending to INDEX_A or INDEX_B

index=_internal host=LICENSE_SERVER source=*license_usage.log* (idx=INDEX_A OR idx=INDEX_B) | bin span=1d _time | stats sum(b) as bytes by h | eval GB=((bytes/1024)/1024)/1024
0 Karma

a212830
Champion

Thanks. Should have been more specific, in addition to the host detailed info, a summary that shows the final average across all of them.

0 Karma

harsmarvania57
Ultra Champion

Do you mean average of all hosts license usage then try below query

index=_internal host=LICENSE_SERVER source=*license_usage.log* (idx=INDEX_A OR idx=INDEX_B) | bin span=1d _time | stats sum(b) as bytes by h | eventstats avg(bytes) as avg_bytes

EDIT: Updated query.

0 Karma

a212830
Champion

I want to calculate how much the average endpoint sends for these paticular indexes.

0 Karma

sloshburch
Splunk Employee
Splunk Employee

Based on the questions you've asked, I think you've got the answer here already.

In the license_usage.log the h is the host and idx is the indexes. So you're just doing stats sum(b) by h, idx.

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...