All Projects → gao715108023 → Monitor

gao715108023 / Monitor

监控服务器(包括Linux和Windows)的资源:CPU\内存\磁盘IO\网络带宽\端口的连接数\进程级别的CPU使用率和内存占用,请配合前台展示monitorweb使用,效果更佳。

Programming Languages

javascript
184084 projects - #8 most used programming language
java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Monitor

Graphtrees
此项目当前不再更新,只适用于3.0和3.2版本
Stars: ✭ 103 (-24.26%)
Mutual labels:  monitor
Opcache Dashboard
Set up properly and monitor your Zend OPcache with this dashboard that will help you checking memory, hits and status, configuring for optimal performance (warning you when cache full, validation, etc.) and reseting one or all scripts with one click.
Stars: ✭ 117 (-13.97%)
Mutual labels:  monitor
Sshdeploy
A command-line tool that enables quick build and run deployments over SSH.
Stars: ✭ 131 (-3.68%)
Mutual labels:  monitor
Pingprom
Prometheus uptime monitoring quickstart
Stars: ✭ 107 (-21.32%)
Mutual labels:  monitor
Tl Wn722n V2
Drivers for TP-LINK TL-WN722N version 2 .Clean ported for kernel 4.4, 4.8, 4.10 ,4.13 ,4.14 & 4.15 from source which was at 4.3
Stars: ✭ 112 (-17.65%)
Mutual labels:  monitor
Watermonitor
Easy way to implement a Video Monitor use Android's AccessbilityService
Stars: ✭ 120 (-11.76%)
Mutual labels:  monitor
Netfil
A kernel network manager with monitoring and limiting capabilities for macOS. #nsacyber
Stars: ✭ 97 (-28.68%)
Mutual labels:  monitor
Logdna Agent
LogDNA Agent streams from log files to your LogDNA account. Works with Linux, Windows, and macOS Servers
Stars: ✭ 134 (-1.47%)
Mutual labels:  monitor
Statusok
Monitor your Website and APIs from your Computer. Get Notified through Slack, E-mail when your server is down or response time is more than expected.
Stars: ✭ 1,522 (+1019.12%)
Mutual labels:  monitor
Health
Laravel Health Panel
Stars: ✭ 1,774 (+1204.41%)
Mutual labels:  monitor
Sysmon
A B/S mode system monitor for linux (demo http://199.247.1.240:2048)
Stars: ✭ 110 (-19.12%)
Mutual labels:  monitor
Nerys Product Monitor Lite
A universal product monitor. Capable of monitoring any site for products based on keywords. Optimized for Shopify. Sends alerts via Discord when new products are detected.
Stars: ✭ 111 (-18.38%)
Mutual labels:  monitor
Jdetects
Detect if DevTools is open
Stars: ✭ 123 (-9.56%)
Mutual labels:  monitor
Container Monitor
容器监控方案汇总
Stars: ✭ 107 (-21.32%)
Mutual labels:  monitor
Hydrapaper
A Gtk utility to set two different backgrounds for each monitor on GNOME (which lacks this feature)
Stars: ✭ 134 (-1.47%)
Mutual labels:  monitor
Iglance
Free system monitor for OSX and macOS. See all system information at a glance in the menu bar.
Stars: ✭ 1,358 (+898.53%)
Mutual labels:  monitor
Sentinel Crawler
Xenomorph Crawler, a Concise, Declarative and Observable Distributed Crawler(Node / Go / Java / Rust) For Web, RDB, OS, also can act as a Monitor(with Prometheus) or ETL for Infrastructure 💫 多语言执行器,分布式爬虫
Stars: ✭ 118 (-13.24%)
Mutual labels:  monitor
Webserial
Remote Serial monitor for ESP8266 & ESP32
Stars: ✭ 133 (-2.21%)
Mutual labels:  monitor
Nebulasolardash
Real - time monitoring of distributed server information
Stars: ✭ 134 (-1.47%)
Mutual labels:  monitor
Sk Admin
基于 Spring Boot、 Spring Data JPA、 Spring Security、Vue 的前后端分离的管理系统。项目采用模块开发方式, 主要模块:权限管理 (RBAC(Role-Based Access Control,基于角色的访问控制),支持数据字典、数据权限管理、前端菜单支持动态路由)、日志管理、代码生成器、系统监控、云存储管理、系统工具等等
Stars: ✭ 130 (-4.41%)
Mutual labels:  monitor

monitor

监控服务器(Linux)的资源,包括:CPU、内存、磁盘IO、网络带宽、端口的连接数、进程的CPU使用率、进程内存占用

项目分为三个模块

  • monitor-agent:资源采集agent
  • monitor-dao:数据库DAO层操作
  • monitor-web:监控页面展示

使用方法

一、安装MySQL

1.1 创建数据库monitor

1.2 创建表

DROP TABLE IF EXISTS `process_monitor`;
CREATE TABLE `process_monitor` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`localIp` VARCHAR(128) NOT NULL COMMENT '服务器ip地址',
`process_name` VARCHAR(128) NOT NULL COMMENT '进程名',
`pid` INT NOT NULL COMMENT '进程id',
`one_mins_procs` FLOAT NOT NULL DEFAULT 0 COMMENT '1分钟进程数',
`five_mins_procs` FLOAT NOT NULL DEFAULT 0 COMMENT '5分钟进程数',
`fifteen_mins_procs` FLOAT NOT NULL DEFAULT 0 COMMENT '15分钟进程数',
`process_cpu_usage` FLOAT NOT NULL DEFAULT 0 COMMENT '进程cpu使用率',
`process_memory_usage` FLOAT NOT NULL DEFAULT 0 COMMENT '进程memory使用率',
`gmt_create` DATETIME DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE = INNODB AUTO_INCREMENT = 1 CHARSET = utf8mb4 ROW_FORMAT = COMPACT;

DROP TABLE IF EXISTS `io_monitor`;
CREATE TABLE `io_monitor` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`localIp` VARCHAR(128) NOT NULL COMMENT '服务器ip地址',
`disk_name` VARCHAR(128) NOT NULL COMMENT '磁盘名称',
`await` FLOAT NOT NULL DEFAULT 0 COMMENT '平均每次I/O花费的毫秒数',
`svctm` FLOAT NOT NULL DEFAULT 0 COMMENT '平均每次输入/输出操作花费的毫秒数',
`util` FLOAT NOT NULL DEFAULT 0 COMMENT '磁盘利用率(%)',
`gmt_create` DATETIME DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE = INNODB AUTO_INCREMENT = 1 CHARSET = utf8mb4 ROW_FORMAT = COMPACT;

DROP TABLE IF EXISTS `netstat_monitor`;
CREATE TABLE `netstat_monitor` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`localIp` VARCHAR(128) NOT NULL COMMENT '服务器ip地址',
`port` INT NOT NULL DEFAULT 0 COMMENT '被监控的端口号',
`total` INT NOT NULL DEFAULT 0 COMMENT '总连接数',
`established` INT NOT NULL DEFAULT 0 COMMENT '状态为ESTABLISHED的连接数',
`time_wait` INT NOT NULL DEFAULT 0 COMMENT '状态为TIME_WAIT的连接数',
`fin_wait2` INT NOT NULL DEFAULT 0 COMMENT '状态为FIN_WAIT2的连接数',
`gmt_create` DATETIME DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE = INNODB AUTO_INCREMENT = 1 CHARSET = utf8mb4 ROW_FORMAT = COMPACT;

DROP TABLE IF EXISTS `traffic_monitor`;
CREATE TABLE `traffic_monitor` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`localIp` VARCHAR(128) NOT NULL COMMENT '服务器ip地址',
`network_card_name` VARCHAR(128) NOT NULL COMMENT '被监控的网卡名称',
`receive_traffic` FLOAT NOT NULL DEFAULT 0 COMMENT '流入带宽/秒',
`receive_packets` FLOAT NOT NULL DEFAULT 0 COMMENT '流入正确的包量/秒',
`receive_errs` FLOAT NOT NULL DEFAULT 0 COMMENT '流入错误的包量/秒',
`transmit_traffic` FLOAT NOT NULL DEFAULT 0 COMMENT '流出带宽/秒',
`transmit_packets` FLOAT NOT NULL DEFAULT 0 COMMENT '流出正确的包量/秒',
`transmit_errs` FLOAT NOT NULL DEFAULT 0 COMMENT '流出错误的包量/秒',
`gmt_create` DATETIME DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE = INNODB AUTO_INCREMENT = 1 CHARSET = utf8mb4 ROW_FORMAT = COMPACT;

二、clone代码至本地

2.1 执行mvn clean install -DskipTests

2.2 将monitor-agent.zip拷贝至待监控的服务器,并解压缩unzip monitor-agent.zip

三、修复conf下的配置信息

3.1 修改infoconfig.properties

sampling.time=5000  #采样时间,设置每隔多长时间监控程序采集一次系统信息,单位为毫秒,默认为5000毫秒
listening.port=80  #该属性只有在监控某端口号的连接数的时候才会起作用,值为需要监控的端口号
network.card.name=eth1  网卡名,当需要监控网络带宽的时候,请设置该选项,默认为eth0
watch.process=tomcat:/opt/tomcat/tomcat.pid  #被监控的进程名和该进程的pid文件路径(绝对路径),多个进程用英文,分割

3.2 修改MyBatis-Configuration.xml

修改MySQL的连接地址

<dataSource type="POOLED">
            <property name="driver" value="com.mysql.jdbc.Driver"/>
            <property name="url"
                      value="jdbc:mysql://localhost:3306/monitor?useUnicode=true&amp;characterEncoding=UTF-8&amp;zeroDateTimeBehavior=convertToNull"/>
            <property name="username" value="root"/>
            <property name="password" value="123456"/>
        </dataSource>

四、启动agent采集节点

执行sh service.sh start

五、关闭agent采集节点

执行sh service.sh stop

六、重启agent采集节点

执行sh service.sh restart

七、部署监控页,图形化展示监控结果(如果不需要可不部署,通过查询MySQL数据库可获取监控结果)

7.1 配置filters下面的配置文件,修改数据库连接地址

7.2 将monitor-web.war拷贝至tomcat下,启动tomcat,打开http://localhost:8080/index.html

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].