All Apps and Add-ons

How do we get a chart the mstats metrics from two indexes?

englotus
New Member

Hi, all, 

 

I am looking for a way to chart the the average cpu and memory per process for all the hosts in two indexes?

The scenario that I have been working on is that I have a bunch of machines running roughly 4 or 5 java applications per host.... and I am looking for a way to make a time series chart with the average cpu and memory used by each java processes in a dashboard...  

like 

host 1

  1. site 1 average cpu chart and average memory chart
  2. site 2 average cpu chart and average memory chart
  3. site 3 average cpu chart and average memory chart 
  4. site 4 average cpu chart and average memory chart 

host 2

  1. site 1 average cpu chart and average memory chart
  2. site 2 average cpu chart and average memory chart
  3. site 3 average cpu chart and average memory chart 
  4. site 4 average cpu chart and average memory chart 
  5. site 5 average cpu chart and average memory chart 
  6. site 6 average cpu chart and average memory chart

  

I tried to get the top processes via hosts, via this code 

```

| mstats max("NIX.ps_metric.pctCPU") AS CPU,max("NIX.ps_metric.pctMEM") AS MEM WHERE ("index"="first_index" OR "index"="second_index") AND "host"="test_host" span=5m BY host ARGS COMMAND

| top limit=20 COMMAND BY CPU MEM host

| chart values(CPU) as CPU, values(MEM) as MEM over COMMAND BY host

```

but all i get is the top processes like by run command and not the actual processes, they seem to be grouped under the java process....

java      CPU  ,  MEMORY

crond   cpu, memory

bash  cpu, memory

 

 

Is there a way to split the monitoring to get something useable?   Ideally, I would like to alert when a particular site is being over worked, like CPU > 85%...

 

Ta,

 

Lane

Labels (2)
Tags (2)
0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...