Monitoring Memory Consumption in NodeJS App

TLDR abhinav wants to monitor memory consumption in their NodeJS app using host metrics. Srikanth advises that they can track it using the `process_memory_usage` metric.

Photo of abhinav
abhinav
Fri, 14 Apr 2023 07:22:48 UTC

I wanna know if my nodeJs app is consuming the memory

Photo of Srikanth
Srikanth
Fri, 14 Apr 2023 07:39:34 UTC

No, you don’t need to install the infra agent if you are already using the host metrics. If you want to see `process_memory_usage` which will contain the command used to start the process and search for the appropriate node process.

Photo of abhinav
abhinav
Fri, 14 Apr 2023 10:15:30 UTC

I am using host metrics and puttig it on grafana

Photo of Srikanth
Srikanth
Fri, 14 Apr 2023 10:23:50 UTC

I didn’t understand. What are you trying to convey?

Photo of abhinav
abhinav
Fri, 14 Apr 2023 10:43:11 UTC

I have only installed APM for my nodeJS app and not the infra agent of signoz

Photo of abhinav
abhinav
Fri, 14 Apr 2023 10:43:18 UTC

yet i want to know the reason of memory leak

Photo of abhinav
abhinav
Fri, 14 Apr 2023 10:43:30 UTC

how can i create such a dashboard for the same?

Photo of Srikanth
Srikanth
Fri, 14 Apr 2023 11:03:33 UTC

> yet i want to know the reason of memory leak The dashboard can only help you know the current memory usage. They will not tell you the reason for the memory leak. As I mentioned earlier, if you are already using the package, you do not need to run the “infra agent” to collect system or process memory usage. There will be a metric named `process_memory_usage` which can be used to track the memory consumption of a particular kind of process.