Coder Social home page Coder Social logo

node-monitor's Introduction

Node-Monitor

I. 简介

首先感谢Easy-Monitor项目,这个项目是在Easy-Monitor基础上,将其按实际需要分解成更适合部署的两个项目。 使项目更加轻量,并各自关注自身重点。后续会根据实际需要进行更多的改造和优化。

Easy-Monitor github 地址:https://github.com/hyj1991/easy-monitor/

轻量级的 Node.js 项目内核性能监控 + 分析工具

- 功能特点

  • 服务器状态概览信息展示
  • 实时 CPU 函数性能分析,帮助定位程序的性能瓶颈点
  • 实时 Memory 堆内内存结构分析,帮助定位到内存疑似泄漏点

项目分成两部分:

  1. Node-Monitor 包括监控页面的http服务,与nmProfiler通讯的tcp服务
  2. nmProfiler 包括profiler和tcp客户端

当前项目即为Node-Monitor部分。 nmProfiler地址:https://github.com/chenguohong/nmProfiler

部署

修改根index.js,设置http和tcp服务端口,如:

nodeMonitor({

dashboard: {

 port_http: 20000,
 
 port_tcp: 30000
 
 },
 auth: {
    need: true, // 需要鉴权
    /**
     @param {string} user 用户名
     @param {string} pass 用户键入密码
     @return {promise}
     **/
    authentication(user, pass) {
        return new Promise(resolve => {
            if ((user === 'admin' && pass === 'admin123')) resolve(true)
            else resolve(false);
        });
    }
}

})

node或pm2启动。 打开你的浏览器,访问http://localhost:20000,即可看到监控界面。

node-monitor's People

Contributors

chenguohong avatar logic3t avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.