Standard node.js metrics?

偶尔善良 提交于 2019-12-24 13:13:14

问题


Are there any standard metrics publishing packages for node.js? I'm not asking about general metrics libraries, but rather packages that produce a specific set of metrics (e.g. http QPS, runtime memory usage, gc stats, etc...) If you wanted to offer a monitoring service for node.js users, what would you monitor?


回答1:


I believe that Node Application Metrics ('appmetrics') provides what your looking for. This is a module that provides a set of metrics about a running Node.js process, rather than a monitoring solution in itself.

In version 1.0.2 is provides the following data types:

  • Environment
  • CPU
  • Memory
  • GC
  • Function profiling
  • HTTP
  • MySQL
  • MongoDB
  • Request tracking
  • Function trace



回答2:


I'm not aware of any package that provides all of that metrics but you can collect most using very popular libraries like pidusage for process related metrics, mongodb driver to retrieve mongo stats, etc

You may read here (my post, bullet 12) about memory profiling



来源:https://stackoverflow.com/questions/29905547/standard-node-js-metrics

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!