All Apps and Add-ons

Splunk App for VMware: How to edit my search to list MOIDs with their avg memory usage over time against the VM Name?

saurabhkunte
Path Finder

Hello,

Hoping one of you can help me figure out what is wrong with the following query i am building in the Splunk App for VMware.

Working Search: this lists me MOIDs with their avg memory usage over a period of time.

(sourcetype="vmware:perf:mem" source="VMPerf:VirtualMachine") OR (sourcetype="vmware:inv:vm" changeSet.name=*) | eval detect = if(p_average_mem_usage_percent < 25.00, "UsageLessThan25%", if(p_average_mem_usage_percent > 80.00, "UsageGreaterThan80%", "normal")) | stats first(detect) as "Memory Usage" by moid

However, I would like to show this stats against the VM Name. Modified search that does not work :

(sourcetype="vmware:perf:mem" source="VMPerf:VirtualMachine") OR (sourcetype="vmware:inv:vm" changeSet.name=*) | eval detect = if(p_average_mem_usage_percent < 25.00, "UsageLessThan25%", if(p_average_mem_usage_percent > 80.00, "UsageGreaterThan80%", "normal")) | stats first(detect) as "Memory Usage" by changeSet.name.

This query lists all the VMs as having normal avg which is not correct. Would appreciate if anyone can help me correct the above query. Many thanks

0 Karma

ansif
Motivator

This is very old question still someone can look into it:

index="vmware-inv" sourcetype="vmware:inv:vm" | join vm_id [ search (sourcetype="vmware:perf:mem" source="VMPerf:VirtualMachine") ]| table vm_name p_average_mem_usage_percent

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...