forked from guojigjkill/dubbo-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Zhiguo.Chen
committed
Jul 7, 2015
1 parent
b493dab
commit 8cef9fb
Showing
352 changed files
with
125,068 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
*~ | ||
.DS_Store | ||
*.iml | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Dubbo Monitor | ||
|
||
## 项目介绍 | ||
Dubbo Monitor是针对Dubbo开发的监控系统,基于dubbo-monitor-simple改进而成,可以理解为其演化版本。该系统用数据库记录日志的方式替代了dubbo-monitor-simple写文件的方式。 | ||
|
||
## 升级日志 | ||
>### 2015-07-06 | ||
> 1. 发布版本1.0.0。 | ||
## Dubbo Monitor使用帮助 | ||
|
||
### Dubbo-Monitor配置介绍 | ||
第一步:创建数据库 | ||
首先创建名称为monitor数据库,编码格式UTF-8。然后将项目sql文件夹下面的create.sql导入到数据库,生成dubbo_invoke表代表成功导入。 | ||
|
||
第二步:编辑项目中application.properties,配置如下: | ||
``` | ||
####Dubbo Settings | ||
dubbo.application.name=dubbo-monitor | ||
dubbo.application.owner=handu.com | ||
dubbo.registry.address=zookeeper://172.16.1.178:2181 | ||
dubbo.protocol.port=6060 | ||
####Database Settings | ||
db.url=jdbc:mysql://172.16.1.85:3306/monitor?prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8 | ||
db.username=root | ||
db.password=root | ||
db.maxActive=500 | ||
``` | ||
|
||
第三步:打包运行项目 | ||
执行maven命令:mvn clean package | ||
target文件夹下生成的dubbo-monitor.war即为项目部署文件,将其放置到对应服务器目录下,启动服务器即可。例如:tomcat的webapps文件夹下。 | ||
|
||
第四步:访问项目 | ||
启动web服务器后,访问地址:http://IP:[host]/dubbo-moniotor | ||
|
||
## 服务提供端配置 | ||
[Dubbo服务提供端监控配置](http://dubbo.io/User+Guide-zh.htm#UserGuide-zh-%3Cdubbo%3Amonitor%2F%3E) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,296 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.handu.open</groupId> | ||
<artifactId>dubbo-monitor</artifactId> | ||
<version>1.0.0</version> | ||
<packaging>war</packaging> | ||
|
||
<name>Dubbo Monitor</name> | ||
<description>Monitor module of dubbo project</description> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
|
||
<dubbo.version>2.8.4</dubbo.version> | ||
<spring.version>4.1.6.RELEASE</spring.version> | ||
<zookeeper.version>3.4.6</zookeeper.version> | ||
<zkclient.version>0.1</zkclient.version> | ||
<curator.version>2.5.0</curator.version> | ||
<servlet.version>3.0.1</servlet.version> | ||
<jetbrick-template.version>2.0.10</jetbrick-template.version> | ||
<mybatis.version>3.2.7</mybatis.version> | ||
<mybatis-spring.version>1.2.2</mybatis-spring.version> | ||
<mysql.version>5.1.30</mysql.version> | ||
<druid.version>1.0.14</druid.version> | ||
<jackson.version>2.3.3</jackson.version> | ||
<junit.version>4.11</junit.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.alibaba</groupId> | ||
<artifactId>dubbo</artifactId> | ||
<version>${dubbo.version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<artifactId>jboss-servlet-api_3.1_spec</artifactId> | ||
<groupId>org.jboss.spec.javax.servlet</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>tomcat-embed-core</artifactId> | ||
<groupId>org.apache.tomcat.embed</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>tomcat-embed-logging-juli</artifactId> | ||
<groupId>org.apache.tomcat.embed</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>javax.servlet-api</artifactId> | ||
<groupId>javax.servlet</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>httpclient</artifactId> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>httpcore</artifactId> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>validation-api</artifactId> | ||
<groupId>javax.validation</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>commons-pool</artifactId> | ||
<groupId>commons-pool</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>resteasy-netty</artifactId> | ||
<groupId>org.jboss.resteasy</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>resteasy-jaxrs</artifactId> | ||
<groupId>org.jboss.resteasy</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jaxrs-api</artifactId> | ||
<groupId>org.jboss.resteasy</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jboss-annotations-api_1.1_spec</artifactId> | ||
<groupId>org.jboss.spec.javax.annotation</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>activation</artifactId> | ||
<groupId>javax.activation</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>commons-codec</artifactId> | ||
<groupId>commons-codec</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>commons-io</artifactId> | ||
<groupId>commons-io</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jcip-annotations</artifactId> | ||
<groupId>net.jcip</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>resteasy-jdk-http</artifactId> | ||
<groupId>org.jboss.resteasy</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>resteasy-undertow</artifactId> | ||
<groupId>org.jboss.resteasy</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>resteasy-client</artifactId> | ||
<groupId>org.jboss.resteasy</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>async-http-servlet-3.0</artifactId> | ||
<groupId>org.jboss.resteasy</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>undertow-servlet</artifactId> | ||
<groupId>io.undertow</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jboss-annotations-api_1.2_spec</artifactId> | ||
<groupId>org.jboss.spec.javax.annotation</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>undertow-core</artifactId> | ||
<groupId>io.undertow</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jboss-logging</artifactId> | ||
<groupId>org.jboss.logging</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>xnio-api</artifactId> | ||
<groupId>org.jboss.xnio</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>xnio-nio</artifactId> | ||
<groupId>org.jboss.xnio</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>resteasy-jackson-provider</artifactId> | ||
<groupId>org.jboss.resteasy</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jackson-core-asl</artifactId> | ||
<groupId>org.codehaus.jackson</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jackson-mapper-asl</artifactId> | ||
<groupId>org.codehaus.jackson</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jackson-jaxrs</artifactId> | ||
<groupId>org.codehaus.jackson</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jackson-xc</artifactId> | ||
<groupId>org.codehaus.jackson</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>resteasy-jaxb-provider</artifactId> | ||
<groupId>org.jboss.resteasy</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jaxb-impl</artifactId> | ||
<groupId>com.sun.xml.bind</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jaxb-core</artifactId> | ||
<groupId>com.sun.xml.bind</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jaxb-api</artifactId> | ||
<groupId>javax.xml.bind</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>istack-commons-runtime</artifactId> | ||
<groupId>com.sun.istack</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>FastInfoset</artifactId> | ||
<groupId>com.sun.xml.fastinfoset</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jsr173_api</artifactId> | ||
<groupId>javax.xml.bind</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jackson-databind</artifactId> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jackson-annotations</artifactId> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jackson-annotations</artifactId> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jackson-core</artifactId> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-webmvc</artifactId> | ||
<version>${spring.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.zookeeper</groupId> | ||
<artifactId>zookeeper</artifactId> | ||
<version>${zookeeper.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.github.sgroschupf</groupId> | ||
<artifactId>zkclient</artifactId> | ||
<version>${zkclient.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>javax.servlet-api</artifactId> | ||
<version>${servlet.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<!-- Jetbrick Template Engineer --> | ||
<dependency> | ||
<groupId>com.github.subchen</groupId> | ||
<artifactId>jetbrick-template-springmvc</artifactId> | ||
<version>${jetbrick-template.version}</version> | ||
</dependency> | ||
<!-- MyBatis --> | ||
<dependency> | ||
<groupId>org.mybatis</groupId> | ||
<artifactId>mybatis</artifactId> | ||
<version>${mybatis.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mybatis</groupId> | ||
<artifactId>mybatis-spring</artifactId> | ||
<version>${mybatis-spring.version}</version> | ||
</dependency> | ||
<!-- MySQL JDBC Driver --> | ||
<dependency> | ||
<groupId>mysql</groupId> | ||
<artifactId>mysql-connector-java</artifactId> | ||
<version>${mysql.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.alibaba</groupId> | ||
<artifactId>druid</artifactId> | ||
<version>${druid.version}</version> | ||
</dependency> | ||
<!-- Spring Data Support --> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-jdbc</artifactId> | ||
<version>${spring.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> | ||
<version>${jackson.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>${jackson.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>${junit.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<finalName>dubbo-monitor</finalName> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.tomcat.maven</groupId> | ||
<artifactId>tomcat7-maven-plugin</artifactId> | ||
<version>2.2</version> | ||
<configuration> | ||
<path>/${project.build.finalName}</path> | ||
<uriEncoding>UTF-8</uriEncoding> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
SET NAMES utf8; | ||
SET FOREIGN_KEY_CHECKS = 0; | ||
|
||
DROP TABLE IF EXISTS `dubbo_invoke`; | ||
CREATE TABLE `dubbo_invoke` ( | ||
`id` varchar(255) NOT NULL DEFAULT '', | ||
`invoke_date` date NOT NULL, | ||
`service` varchar(255) DEFAULT NULL, | ||
`method` varchar(255) DEFAULT NULL, | ||
`consumer` varchar(255) DEFAULT NULL, | ||
`provider` varchar(255) DEFAULT NULL, | ||
`type` varchar(255) DEFAULT '', | ||
`invoke_time` bigint(20) DEFAULT NULL, | ||
`success` int(11) DEFAULT NULL, | ||
`failure` int(11) DEFAULT NULL, | ||
`elapsed` int(11) DEFAULT NULL, | ||
`concurrent` int(11) DEFAULT NULL, | ||
`max_elapsed` int(11) DEFAULT NULL, | ||
`max_concurrent` int(11) DEFAULT NULL, | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; | ||
|
||
SET FOREIGN_KEY_CHECKS = 1; |
Oops, something went wrong.