<p>Prometheus can surface any metrics you like, you just need a proper exporter for the apps.  E.g. there will be JVM exporters to export JVM heap metrics.  Many apps support JMX (also in Java), or other similar mechanisms in other languages for reporting metrics and counters as well (e.g. we use these to get detailed presto memory use metrics).</p>

<p>You may want process exporter or something similar -> <a href="https://github.com/ncabatoff/process-exporter" rel="nofollow noreferrer">https://github.com/ncabatoff/process-exporter</a>.</p>

<p>If you really had to, you could even write something as simplistic as a kubectl exec command to grab stats from the container and save them in prometheus exporter file format and scrape it off apache/nginx.</p>

<p>Other than that, go for a good APM solution that holds the metrics for you and fork out some cash =).</p>

CC BY-SA 4.0
2020-04-19T01:51:57.980Z
2020-04-19T01:51:57.980Z
John Humphreys
<p>There are <a href="https://techbeacon.com/enterprise-it/9-top-open-source-tools-monitoring-kubernetes" rel="nofollow noreferrer">several alternatives</a> to Prometheus for monitoring your cluster.</p>

<p>While some like <a href="https://github.com/kubernetes-retired/heapster" rel="nofollow noreferrer">Heapster</a> have been superseded by Prometheus, other solutions such as <a href="https://github.com/google/cadvisor" rel="nofollow noreferrer">cAdvisor</a> may have the functionality you are looking for.</p>

CC BY-SA 4.0
2019-11-21T15:25:00.487Z
I am already using 3 items (weave scope - grafana & Prometheus - EFK) of that list and non of them (my 3 and other things) is giving me the metrics that I want except the weave and Weave scope cannot store the data.
AVarf
CC BY-SA 4.0
2019-11-20T18:59:17.863Z
2019-11-20T18:59:17.863Z
Wesley Rolnick
<p>I am searching for a tool similar to Prometheus + Grafana that gather and record resource usage especially memory usage by process-ID or process-name.</p>

<p>We have two components that are running different processes and they have memory leak and I want to find which process is leaking.</p>

<p>This is from Weave Scope and it shows all the processes of each pod and their resource usage but it is just live, I want something similar but storing it over time like a Prometheus graph.</p>

<p><a href="https://i.sstatic.net/gyUMf.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/gyUMf.png" alt="enter image description here"></a></p>

<kubernetes><monitoring><prometheus>
Gather resource usage by process in a kubernetes cluster
AVarf
# Gather resource usage by process in a kubernetes cluster

(Asked by: username_0 on 2019-11-20)

I am searching for a tool similar to Prometheus + Grafana that gather and record resource usage especially memory usage by process-ID or process-name.

We have two components that are running different processes and they have memory leak and I want to find which process is leaking.

This is from Weave Scope and it shows all the processes of each pod and their resource usage but it is just live, I want something similar but storing it over time like a Prometheus graph.

[![enter image description here](https://i.sstatic.net/gyUMf.png)](https://i.sstatic.net/gyUMf.png)

**Tags:** kubernetes, monitoring, prometheus


---

## 2 answers

### Answer by username_1 on 2020-04-19. Score: 0

Prometheus can surface any metrics you like, you just need a proper exporter for the apps. E.g. there will be JVM exporters to export JVM heap metrics. Many apps support JMX (also in Java), or other similar mechanisms in other languages for reporting metrics and counters as well (e.g. we use these to get detailed presto memory use metrics).

You may want process exporter or something similar -> <https://github.com/ncabatoff/process-exporter>.

If you really had to, you could even write something as simplistic as a kubectl exec command to grab stats from the container and save them in prometheus exporter file format and scrape it off apache/nginx.

Other than that, go for a good APM solution that holds the metrics for you and fork out some cash =).


---

### Answer by username_2 on 2019-11-20. Score: 0

There are [several alternatives](https://techbeacon.com/enterprise-it/9-top-open-source-tools-monitoring-kubernetes) to Prometheus for monitoring your cluster.

While some like [Heapster](https://github.com/kubernetes-retired/heapster) have been superseded by Prometheus, other solutions such as [cAdvisor](https://github.com/google/cadvisor) may have the functionality you are looking for.

> **Comments:**
> **username_0**: I am already using 3 items (weave scope - grafana & Prometheus - EFK) of that list and non of them (my 3 and other things) is giving me the metrics that I want except the weave and Weave scope cannot store the data.  

---

