Compare commits
14 Commits
fix#jdbcsp
...
feature#or
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5be12076c3 | ||
|
|
47bf9f1901 | ||
|
|
58bb47114b | ||
|
|
262a765141 | ||
|
|
dfc7ece93d | ||
|
|
d169dac94d | ||
|
|
cc22196d4a | ||
|
|
820cb7a3e5 | ||
|
|
155bdaf462 | ||
|
|
11981942d7 | ||
|
|
8473545d89 | ||
|
|
eea9e601cf | ||
|
|
5e9c00934e | ||
|
|
73d743a078 |
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
## HertzBeat 赫兹跳动
|
## HertzBeat 赫兹跳动
|
||||||
|
|
||||||
> 易用友好的高性能监控告警系统。
|
> 易用友好的监控告警系统。
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|||||||
@@ -109,6 +109,13 @@
|
|||||||
<artifactId>mssql-jdbc</artifactId>
|
<artifactId>mssql-jdbc</artifactId>
|
||||||
<version>10.2.0.jre8</version>
|
<version>10.2.0.jre8</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- oracle -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.oracle</groupId>
|
||||||
|
<artifactId>ojdbc6</artifactId>
|
||||||
|
<version>11.2.0.3</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -285,6 +285,10 @@ public class JdbcCommonCollect extends AbstractCollect {
|
|||||||
url = "jdbc:sqlserver://" + jdbcProtocol.getHost() + ":" + jdbcProtocol.getPort()
|
url = "jdbc:sqlserver://" + jdbcProtocol.getHost() + ":" + jdbcProtocol.getPort()
|
||||||
+ ";" + (jdbcProtocol.getDatabase() == null ? "" : "DatabaseName=" + jdbcProtocol.getDatabase());
|
+ ";" + (jdbcProtocol.getDatabase() == null ? "" : "DatabaseName=" + jdbcProtocol.getDatabase());
|
||||||
break;
|
break;
|
||||||
|
case "oracle":
|
||||||
|
url = "jdbc:oracle:thin:@" + jdbcProtocol.getHost() + ":" + jdbcProtocol.getPort()
|
||||||
|
+ "/" + (jdbcProtocol.getDatabase() == null ? "" : jdbcProtocol.getDatabase());
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException("Not support database platform: " + jdbcProtocol.getPlatform());
|
throw new IllegalArgumentException("Not support database platform: " + jdbcProtocol.getPlatform());
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ public class JdbcSpiLoader implements CommandLineRunner {
|
|||||||
Class.forName("com.mysql.cj.jdbc.Driver");
|
Class.forName("com.mysql.cj.jdbc.Driver");
|
||||||
Class.forName("org.postgresql.Driver");
|
Class.forName("org.postgresql.Driver");
|
||||||
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
|
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
|
||||||
|
Class.forName("oracle.jdbc.driver.OracleDriver");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("load jdbc error: {}", e.getMessage(), e);
|
log.error("load jdbc error: {}", e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class CommonDispatcher implements MetricsTaskDispatch, CollectDataDispatc
|
|||||||
/**
|
/**
|
||||||
* 指标组采集任务超时时间值
|
* 指标组采集任务超时时间值
|
||||||
*/
|
*/
|
||||||
private static final long DURATION_TIME = 120_000L;
|
private static final long DURATION_TIME = 240_000L;
|
||||||
/**
|
/**
|
||||||
* 指标组采集任务优先级队列
|
* 指标组采集任务优先级队列
|
||||||
*/
|
*/
|
||||||
@@ -94,7 +94,7 @@ public class CommonDispatcher implements MetricsTaskDispatch, CollectDataDispatc
|
|||||||
Thread.currentThread().setName("metrics-task-monitor");
|
Thread.currentThread().setName("metrics-task-monitor");
|
||||||
while (!Thread.currentThread().isInterrupted()) {
|
while (!Thread.currentThread().isInterrupted()) {
|
||||||
try {
|
try {
|
||||||
// 检测每个指标组采集单元是否超时2分钟,超时则丢弃并返回异常
|
// 检测每个指标组采集单元是否超时4分钟,超时则丢弃并返回异常
|
||||||
long deadline = System.currentTimeMillis() - DURATION_TIME;
|
long deadline = System.currentTimeMillis() - DURATION_TIME;
|
||||||
for (Map.Entry<String, MetricsTime> entry : metricsTimeoutMonitorMap.entrySet()) {
|
for (Map.Entry<String, MetricsTime> entry : metricsTimeoutMonitorMap.entrySet()) {
|
||||||
MetricsTime metricsTime = entry.getValue();
|
MetricsTime metricsTime = entry.getValue();
|
||||||
@@ -165,7 +165,7 @@ public class CommonDispatcher implements MetricsTaskDispatch, CollectDataDispatc
|
|||||||
metricsSet.forEach(metricItem -> {
|
metricsSet.forEach(metricItem -> {
|
||||||
MetricsCollect metricsCollect = new MetricsCollect(metricItem, timeout, this);
|
MetricsCollect metricsCollect = new MetricsCollect(metricItem, timeout, this);
|
||||||
jobRequestQueue.addJob(metricsCollect);
|
jobRequestQueue.addJob(metricsCollect);
|
||||||
metricsTimeoutMonitorMap.put(job.getId() + metrics.getName(),
|
metricsTimeoutMonitorMap.put(job.getId() + "-" + metrics.getName(),
|
||||||
new MetricsTime(System.currentTimeMillis(), metrics, timeout));
|
new MetricsTime(System.currentTimeMillis(), metrics, timeout));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -185,7 +185,7 @@ public class CommonDispatcher implements MetricsTaskDispatch, CollectDataDispatc
|
|||||||
metricsSet.forEach(metricItem -> {
|
metricsSet.forEach(metricItem -> {
|
||||||
MetricsCollect metricsCollect = new MetricsCollect(metricItem, timeout, this);
|
MetricsCollect metricsCollect = new MetricsCollect(metricItem, timeout, this);
|
||||||
jobRequestQueue.addJob(metricsCollect);
|
jobRequestQueue.addJob(metricsCollect);
|
||||||
metricsTimeoutMonitorMap.put(job.getId() + metrics.getName(),
|
metricsTimeoutMonitorMap.put(job.getId() + "-" + metrics.getName(),
|
||||||
new MetricsTime(System.currentTimeMillis(), metrics, timeout));
|
new MetricsTime(System.currentTimeMillis(), metrics, timeout));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ public class Job {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (!metricsSet.remove(metrics)) {
|
if (!metricsSet.remove(metrics)) {
|
||||||
log.error("Job {} appId {} app {} metrics {} remove empty error in priorMetrics.",
|
log.warn("Job {} appId {} app {} metrics {} remove empty error in priorMetrics.",
|
||||||
id, monitorId, app, metrics.getName());
|
id, monitorId, app, metrics.getName());
|
||||||
}
|
}
|
||||||
if (metricsSet.isEmpty()) {
|
if (metricsSet.isEmpty()) {
|
||||||
|
|||||||
70
home/blog/2022-03-20-hertzbeat-v1.0-beta.6.md
Normal file
70
home/blog/2022-03-20-hertzbeat-v1.0-beta.6.md
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
---
|
||||||
|
title: HertzBeat赫兹节拍 v1.0.beta.6 发布,Linux监控来啦
|
||||||
|
author: tom
|
||||||
|
author_title: tom
|
||||||
|
author_url: https://github.com/tomsun28
|
||||||
|
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
|
||||||
|
tags: [opensource]
|
||||||
|
---
|
||||||
|
|
||||||
|
HertzBeat赫兹跳动是由Dromara孵化,TanCloud开源的一个支持网站,API,PING,端口,数据库,操作系统,全站等监控类型,支持阈值告警,告警通知(邮箱,webhook,钉钉,企业微信,飞书机器人),拥有易用友好的可视化操作界面的开源监控告警项目。
|
||||||
|
|
||||||
|
官网:hertzbeat.com | tancloud.cn
|
||||||
|
|
||||||
|
此升级版本包含了很多同学需要的Linux操作系统监控支持,支持其CPU,内存,磁盘,网络等指标,重要的是同步支持了SSH自定义,我们可以很方便的写脚本监控我们想要的Linux指标,也新增了对主流的数据库SqlServer监控支持等,更多功能欢迎使用。
|
||||||
|
|
||||||
|
版本特性:
|
||||||
|
1. feature 新增支持Linux操作系统监控类型(支持CPU内存磁盘网卡等监控指标) (#20)
|
||||||
|
2. feature 新增支持microsoft sqlserver数据库监控类型 (#37)
|
||||||
|
3. feature 添加docker-compose部署方案 (#27) 由 @jx10086 贡献 thanks
|
||||||
|
4. feature 监控列表支持状态过滤和字段搜索功能 (#29)
|
||||||
|
5. feature 新增mysql,postgresql等数据库查询超时时间设置 (#18) 由 @学习代码的小白 贡献
|
||||||
|
6. [纳管]修改为[监控]表述,[探测]修改为[测试]表述
|
||||||
|
7. feature add github build and translate action (#22)
|
||||||
|
8. feature 新增贡献指南,本地代码启动文档
|
||||||
|
9. docs 指定mysql和tdengine版本,避免环境问题
|
||||||
|
|
||||||
|
BUG修复
|
||||||
|
1. fix 由于链接复用不佳造成创建过多链接监控异常 (#26)
|
||||||
|
2. fix 页面全局监控搜索结果异常 (#28) issue by @Suremotoo
|
||||||
|
3. 代码优化 #I4U9BT 由 @学习代码的小白 贡献
|
||||||
|
4. fix 服务启动脚本偶现端口占用误判问题
|
||||||
|
5. 时间本地时区格式化 (#35)
|
||||||
|
6. fix 此版本引入问题jdbc解析异常 (#36)
|
||||||
|
7. fix jdbc并发注册加载时由于spi机制加载死锁问题 (#40)
|
||||||
|
|
||||||
|
欢迎在线试用 https://console.tancloud.cn.
|
||||||
|
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
> [HertzBeat赫兹跳动](https://github.com/dromara/hertzbeat) 是由[Dromara](https://dromara.org)孵化,[TanCloud](https://tancloud.cn)开源的一个支持网站,API,PING,端口,数据库,操作系统等监控类型,拥有易用友好的可视化操作界面的开源监控告警项目。
|
||||||
|
> 我们也提供了对应的 **[SAAS版本监控云](https://console.tancloud.cn)**,中小团队和个人无需再为了监控自己的网站资源,而去部署一套繁琐的监控系统,**[登录即可免费开始](https://console.tancloud.cn)**。
|
||||||
|
> HertzBeat 支持[自定义监控](https://hertzbeat.com/docs/advanced/extend-point) ,只用通过配置YML文件我们就可以自定义需要的监控类型和指标,来满足常见的个性化需求。
|
||||||
|
> HertzBeat 模块化,`manager, collector, scheduler, warehouse, alerter` 各个模块解耦合,方便理解与定制开发。
|
||||||
|
> HertzBeat 支持更自由化的告警配置(计算表达式),支持告警通知,告警模版,邮件钉钉微信飞书等及时通知送达
|
||||||
|
> 欢迎登录 HertzBeat 的 [云环境TanCloud](https://console.tancloud.cn) 试用发现更多。
|
||||||
|
> 我们正在快速迭代中,欢迎参与加入一起共建项目开源生态。
|
||||||
|
|
||||||
|
> `HertzBeat`的多类型支持,易扩展,低耦合,希望能帮助开发者和中小团队快速搭建自有监控系统。
|
||||||
|
|
||||||
|
老铁们可以通过演示视频来直观了解功能: https://www.bilibili.com/video/BV1Vi4y1f7i8
|
||||||
|
|
||||||
|
##### 欢迎联系交流哦
|
||||||
|
|
||||||
|
**微信交流群**
|
||||||
|
|
||||||
|
加微信号 tan-cloud 或 扫描下面账号二维码拉进微信群。
|
||||||
|
<img alt="tan-cloud" src="https://cdn.jsdelivr.net/gh/dromara/hertzbeat@gh-pages/img/docs/help/tan-cloud-wechat.jpg" width="200"/>
|
||||||
|
|
||||||
|
**QQ交流群**
|
||||||
|
|
||||||
|
加QQ群号 718618151 或 扫描下面的群二维码进群, 验证信息: tancloud
|
||||||
|
|
||||||
|
<img alt="tan-cloud" src="https://cdn.jsdelivr.net/gh/dromara/hertzbeat@gh-pages/img/docs/help/qq-qr.jpg" width="200"/>
|
||||||
|
|
||||||
|
**仓库地址**
|
||||||
|
|
||||||
|
[Github](https://github.com/dromara/hertzbeat) https://github.com/dromara/hertzbeat
|
||||||
|
[Gitee](https://gitee.com/dromara/hertzbeat) https://gitee.com/dromara/hertzbeat
|
||||||
|
|
||||||
|
看到这里不妨给个Star哦,灰常感谢,弯腰!!
|
||||||
@@ -3,7 +3,7 @@ id: extend-jdbc
|
|||||||
title: JDBC协议自定义监控
|
title: JDBC协议自定义监控
|
||||||
sidebar_label: JDBC协议自定义监控
|
sidebar_label: JDBC协议自定义监控
|
||||||
---
|
---
|
||||||
> 从[自定义监控](extend-point)了解熟悉了怎么自定义类型,指标,协议等,这里我们来详细介绍下用JDBC(目前支持mysql,mariadb,postgresql)自定义指标监控。
|
> 从[自定义监控](extend-point)了解熟悉了怎么自定义类型,指标,协议等,这里我们来详细介绍下用JDBC(目前支持mysql,mariadb,postgresql,sqlserver)自定义指标监控。
|
||||||
> JDBC协议自定义监控可以让我们很方便的通过写SQL查询语句就能监控到我们想监控的指标
|
> JDBC协议自定义监控可以让我们很方便的通过写SQL查询语句就能监控到我们想监控的指标
|
||||||
|
|
||||||
### JDBC协议采集流程
|
### JDBC协议采集流程
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ sidebar_label: 帮助入门
|
|||||||
|
|
||||||
### 数据库监控
|
### 数据库监控
|
||||||
|
|
||||||
[MYSQL数据库监控](mysql)      [MariaDB数据库监控](mariadb)      [PostgreSQL数据库监控](postgresql)
|
[MYSQL数据库监控](mysql)      [MariaDB数据库监控](mariadb)      [PostgreSQL数据库监控](postgresql)      [SqlServer数据库监控](sqlserver)
|
||||||
|
|
||||||
### 操作系统监控
|
### 操作系统监控
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ sidebar_label: MariaDB数据库
|
|||||||
| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 |
|
| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 |
|
||||||
| 监控名称 | 标识此监控的名称,名称需要保证唯一性。 |
|
| 监控名称 | 标识此监控的名称,名称需要保证唯一性。 |
|
||||||
| 端口 | 数据库对外提供的端口,默认为3306。 |
|
| 端口 | 数据库对外提供的端口,默认为3306。 |
|
||||||
|
| 查询超时时间 | 设置SQL查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 |
|
||||||
| 数据库名称 | 数据库实例名称,可选。 |
|
| 数据库名称 | 数据库实例名称,可选。 |
|
||||||
| 用户名 | 数据库连接用户名,可选 |
|
| 用户名 | 数据库连接用户名,可选 |
|
||||||
| 密码 | 数据库连接密码,可选 |
|
| 密码 | 数据库连接密码,可选 |
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ sidebar_label: MYSQL数据库
|
|||||||
| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 |
|
| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 |
|
||||||
| 监控名称 | 标识此监控的名称,名称需要保证唯一性。 |
|
| 监控名称 | 标识此监控的名称,名称需要保证唯一性。 |
|
||||||
| 端口 | 数据库对外提供的端口,默认为3306。 |
|
| 端口 | 数据库对外提供的端口,默认为3306。 |
|
||||||
|
| 查询超时时间 | 设置SQL查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 |
|
||||||
| 数据库名称 | 数据库实例名称,可选。 |
|
| 数据库名称 | 数据库实例名称,可选。 |
|
||||||
| 用户名 | 数据库连接用户名,可选 |
|
| 用户名 | 数据库连接用户名,可选 |
|
||||||
| 密码 | 数据库连接密码,可选 |
|
| 密码 | 数据库连接密码,可选 |
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ sidebar_label: PostgreSQL数据库
|
|||||||
| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 |
|
| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 |
|
||||||
| 监控名称 | 标识此监控的名称,名称需要保证唯一性。 |
|
| 监控名称 | 标识此监控的名称,名称需要保证唯一性。 |
|
||||||
| 端口 | 数据库对外提供的端口,默认为5432。 |
|
| 端口 | 数据库对外提供的端口,默认为5432。 |
|
||||||
|
| 查询超时时间 | 设置SQL查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 |
|
||||||
| 数据库名称 | 数据库实例名称,可选。 |
|
| 数据库名称 | 数据库实例名称,可选。 |
|
||||||
| 用户名 | 数据库连接用户名,可选 |
|
| 用户名 | 数据库连接用户名,可选 |
|
||||||
| 密码 | 数据库连接密码,可选 |
|
| 密码 | 数据库连接密码,可选 |
|
||||||
|
|||||||
57
home/docs/help/sqlserver.md
Normal file
57
home/docs/help/sqlserver.md
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
---
|
||||||
|
id: sqlserver
|
||||||
|
title: 监控:SqlServer数据库监控
|
||||||
|
sidebar_label: SqlServer数据库
|
||||||
|
---
|
||||||
|
|
||||||
|
> 对SqlServer数据库的通用性能指标进行采集监控。支持SqlServer 2017+。
|
||||||
|
|
||||||
|
### 配置参数
|
||||||
|
|
||||||
|
| 参数名称 | 参数帮助描述 |
|
||||||
|
| ----------- | ----------- |
|
||||||
|
| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 |
|
||||||
|
| 监控名称 | 标识此监控的名称,名称需要保证唯一性。 |
|
||||||
|
| 端口 | 数据库对外提供的端口,默认为1433。 |
|
||||||
|
| 查询超时时间 | 设置SQL查询未响应数据时的超时时间,单位ms毫秒,默认3000毫秒。 |
|
||||||
|
| 数据库名称 | 数据库实例名称,可选。 |
|
||||||
|
| 用户名 | 数据库连接用户名,可选 |
|
||||||
|
| 密码 | 数据库连接密码,可选 |
|
||||||
|
| URL | 数据库连接URL,可选,若配置,则URL里面的数据库名称,用户名密码等参数会覆盖上面配置的参数 |
|
||||||
|
| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为10秒 |
|
||||||
|
| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 |
|
||||||
|
| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 |
|
||||||
|
|
||||||
|
### 采集指标
|
||||||
|
|
||||||
|
#### 指标集合:basic
|
||||||
|
|
||||||
|
| 指标名称 | 指标单位 | 指标帮助描述 |
|
||||||
|
| ----------- | ----------- | ----------- |
|
||||||
|
| machine_name | 无 | 运行服务器实例的 Windows 计算机名称 |
|
||||||
|
| server_name | 无 | 与Windows实例关联的服务器和实例信息SQL Server |
|
||||||
|
| version | 无 | 实例的版本,SQL Server,格式为"major.minor.build.revision" |
|
||||||
|
| edition | 无 | 已安装的 实例的产品SQL Server版本 |
|
||||||
|
| start_time | 无 | 数据库启动时间 |
|
||||||
|
|
||||||
|
#### 指标集合:performance_counters
|
||||||
|
|
||||||
|
| 指标名称 | 指标单位 | 指标帮助描述 |
|
||||||
|
| ----------- | ----------- | ----------- |
|
||||||
|
| database_pages | 无 | Database pages, 已获得的页面数(缓冲池) |
|
||||||
|
| target_pages | 无 | Target pages, 缓冲池必须的理想页面数 |
|
||||||
|
| page_life_expectancy | s,秒 | Page life expectancy, 数据页在缓冲池中驻留的时间,这个时间一般会大于 300 |
|
||||||
|
| buffer_cache_hit_ratio | % | Buffer cache hit ratio, 数据库缓冲池高速缓冲命中率,被请求的数据在缓冲池中被找到的概率,一般会大于 80% 才算正常,否则可能是缓冲池容量太小 |
|
||||||
|
| checkpoint_pages_sec | 无 | Checkpoint pages/sec, 检查点每秒写入磁盘的脏页个数,如果数据过高,证明缺少内存容量 |
|
||||||
|
| page_reads_sec | 无 | Page reads/sec, 缓存池中每秒读的页数 |
|
||||||
|
| page_writes_sec | 无 | Page writes/sec, 缓存池中每秒写的页数 |
|
||||||
|
|
||||||
|
|
||||||
|
#### 指标集合:connection
|
||||||
|
|
||||||
|
| 指标名称 | 指标单位 | 指标帮助描述 |
|
||||||
|
| ----------- | ----------- | ----------- |
|
||||||
|
| user_connection | 无 | 已连接的会话数 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -5,7 +5,7 @@ sidebar_label: 介绍
|
|||||||
slug: /
|
slug: /
|
||||||
---
|
---
|
||||||
|
|
||||||
> 易用友好的高性能监控告警系统。
|
> 易用友好的监控告警系统。
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|||||||
@@ -82,7 +82,7 @@ sidebar_label: Docker方式部署
|
|||||||
- tancloud/hertzbeat:[版本tag] : 使用拉取的HertzBeat官方发布的应用镜像来启动容器,TAG可查看[官方镜像仓库](https://hub.docker.com/r/tancloud/hertzbeat/tags)
|
- tancloud/hertzbeat:[版本tag] : 使用拉取的HertzBeat官方发布的应用镜像来启动容器,TAG可查看[官方镜像仓库](https://hub.docker.com/r/tancloud/hertzbeat/tags)
|
||||||
|
|
||||||
7. 开始探索HertzBeat
|
7. 开始探索HertzBeat
|
||||||
浏览器访问 http://ip:1157/console 开始使用HertzBeat进行监控告警。
|
浏览器访问 http://ip:1157/console 开始使用HertzBeat进行监控告警,默认账户密码 admin/admin。
|
||||||
|
|
||||||
**HAVE FUN**
|
**HAVE FUN**
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ sidebar_label: 安装包方式部署
|
|||||||
$ ./startup.sh
|
$ ./startup.sh
|
||||||
```
|
```
|
||||||
6. 开始探索HertzBeat
|
6. 开始探索HertzBeat
|
||||||
浏览器访问 http://ip:1157/console 开始使用HertzBeat进行监控告警。
|
浏览器访问 http://ip:1157/console 开始使用HertzBeat进行监控告警,默认账户密码 admin/admin。
|
||||||
|
|
||||||
**HAVE FUN**
|
**HAVE FUN**
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ sidebar_label: 快速开始
|
|||||||
1. 此为前后端分离项目,本地代码调试需要分别启动后端工程manager和前端工程web-app
|
1. 此为前后端分离项目,本地代码调试需要分别启动后端工程manager和前端工程web-app
|
||||||
2. 后端:需要`maven3+`和`java8+`环境,修改YML配置信息并启动manager服务
|
2. 后端:需要`maven3+`和`java8+`环境,修改YML配置信息并启动manager服务
|
||||||
3. 前端:需要`nodejs npm angular-cli`环境,待本地后端启动后,在web-app目录下启动 `ng serve --open`
|
3. 前端:需要`nodejs npm angular-cli`环境,待本地后端启动后,在web-app目录下启动 `ng serve --open`
|
||||||
4. 浏览器访问 localhost:4200 即可开始
|
4. 浏览器访问 localhost:4200 即可开始,默认账户密码 admin/admin
|
||||||
|
|
||||||
详细步骤参考 [参与贡献之本地代码启动](../others/contributing)
|
详细步骤参考 [参与贡献之本地代码启动](../others/contributing)
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,8 @@
|
|||||||
"items": [
|
"items": [
|
||||||
"help/mysql",
|
"help/mysql",
|
||||||
"help/mariadb",
|
"help/mariadb",
|
||||||
"help/postgresql"
|
"help/postgresql",
|
||||||
|
"help/sqlserver"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export const features = [{
|
|||||||
custom: <a href={'/docs/advanced/extend-point'}><strong>自定义监控</strong></a>,
|
custom: <a href={'/docs/advanced/extend-point'}><strong>自定义监控</strong></a>,
|
||||||
br: <br/>
|
br: <br/>
|
||||||
}}>
|
}}>
|
||||||
{'HertzBeat目前支持对网站,API,PING连通性,端口可用性,SiteMap全站,MYSQL数据库等的监控,不久我们将兼容 prometheus 协议,提供更多的监控类型和性能指标。{br}' +
|
{'HertzBeat目前支持对网站,API,PING连通性,端口可用性,SiteMap全站,数据库,操作系统等的监控,快速迭代提供更多的监控类型和性能指标。{br}' +
|
||||||
'我们提供了更自由化的阈值告警配置,支持邮箱,短信,webhook,钉钉,企业微信,飞书机器人等告警通知。{br}' +
|
'我们提供了更自由化的阈值告警配置,支持邮箱,短信,webhook,钉钉,企业微信,飞书机器人等告警通知。{br}' +
|
||||||
'不同团队的监控需求千变万化,我们提供{custom},仅需配置YML就能快速接入监控系统。'
|
'不同团队的监控需求千变万化,我们提供{custom},仅需配置YML就能快速接入监控系统。'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,12 +28,13 @@ function Home() {
|
|||||||
<h1 className="hero__title">
|
<h1 className="hero__title">
|
||||||
<img style={{width: '500px', marginTop: '100px'}} src={cdnTransfer('img/hertzbeat-brand.svg')} alt={'#'}/>
|
<img style={{width: '500px', marginTop: '100px'}} src={cdnTransfer('img/hertzbeat-brand.svg')} alt={'#'}/>
|
||||||
</h1>
|
</h1>
|
||||||
<p className="hero__subtitle"><Translate>易用友好的高性能监控告警系统</Translate></p>
|
<p className="hero__subtitle"><Translate>易用友好的监控告警系统</Translate></p>
|
||||||
<div className={styles.social}>
|
<div className={styles.social}>
|
||||||
<a href="https://console.tancloud.cn"><img src={cdnTransfer('img/badge/web-monitor.svg')} alt={''}/></a>
|
<a href="https://console.tancloud.cn"><img src={cdnTransfer('img/badge/web-monitor.svg')} alt={''}/></a>
|
||||||
<a href="https://console.tancloud.cn"><img src={cdnTransfer('img/badge/ping-connect.svg')} alt={''}/></a>
|
<a href="https://console.tancloud.cn"><img src={cdnTransfer('img/badge/ping-connect.svg')} alt={''}/></a>
|
||||||
<a href="https://console.tancloud.cn"><img src={cdnTransfer('img/badge/port-available.svg')} alt={''}/></a>
|
<a href="https://console.tancloud.cn"><img src={cdnTransfer('img/badge/port-available.svg')} alt={''}/></a>
|
||||||
<a href="https://console.tancloud.cn"><img src={cdnTransfer('img/badge/database-monitor.svg')} alt={''}/></a>
|
<a href="https://console.tancloud.cn"><img src={cdnTransfer('img/badge/database-monitor.svg')} alt={''}/></a>
|
||||||
|
<a href="https://console.tancloud.cn"><img src={cdnTransfer('img/badge/os-monitor.svg')} alt={''}/></a>
|
||||||
<a href="https://console.tancloud.cn"><img src={cdnTransfer('img/badge/custom-monitor.svg')} alt={''}/></a>
|
<a href="https://console.tancloud.cn"><img src={cdnTransfer('img/badge/custom-monitor.svg')} alt={''}/></a>
|
||||||
<a href="https://console.tancloud.cn"><img src={cdnTransfer('img/badge/threshold.svg')} alt={''}/></a>
|
<a href="https://console.tancloud.cn"><img src={cdnTransfer('img/badge/threshold.svg')} alt={''}/></a>
|
||||||
<a href="https://console.tancloud.cn"><img src={cdnTransfer('img/badge/alert.svg')} alt={''}/></a>
|
<a href="https://console.tancloud.cn"><img src={cdnTransfer('img/badge/alert.svg')} alt={''}/></a>
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ spring:
|
|||||||
on-profile: prod
|
on-profile: prod
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
username: admin
|
username: root
|
||||||
password: admin
|
password: 123456
|
||||||
url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||||
platform: mysql
|
platform: mysql
|
||||||
hikari:
|
hikari:
|
||||||
|
|||||||
52
manager/src/main/resources/define/app/oracle.yml
Normal file
52
manager/src/main/resources/define/app/oracle.yml
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
category: db
|
||||||
|
app: oracle
|
||||||
|
name:
|
||||||
|
zh-CN: Oracle数据库
|
||||||
|
en-US: Oracle DB
|
||||||
|
# 参数映射map. type是参数类型: 0-number数字, 1-string明文字符串, 2-secret加密字符串
|
||||||
|
# 强制固定必须参数 - host
|
||||||
|
configmap:
|
||||||
|
- key: host
|
||||||
|
type: 1
|
||||||
|
- key: port
|
||||||
|
type: 0
|
||||||
|
- key: username
|
||||||
|
type: 1
|
||||||
|
- key: password
|
||||||
|
type: 2
|
||||||
|
- key: database
|
||||||
|
type: 1
|
||||||
|
- key: timeout
|
||||||
|
type: 0
|
||||||
|
- key: url
|
||||||
|
type: 1
|
||||||
|
# 指标组列表
|
||||||
|
metrics:
|
||||||
|
- name: basic
|
||||||
|
# 指标组调度优先级(0-127)越小优先级越高,优先级低的指标组会等优先级高的指标组采集完成后才会被调度,相同优先级的指标组会并行调度采集
|
||||||
|
# 优先级为0的指标组为可用性指标组,即它会被首先调度,采集成功才会继续调度其它指标组,采集失败则中断调度
|
||||||
|
priority: 0
|
||||||
|
# 指标组中的具体监控指标
|
||||||
|
fields:
|
||||||
|
# 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位
|
||||||
|
- field: DST_PRIMARY_TT_VERSION
|
||||||
|
type: 1
|
||||||
|
instance: true
|
||||||
|
- field: NLS_RDBMS_VERSION
|
||||||
|
type: 1
|
||||||
|
protocol: jdbc
|
||||||
|
jdbc:
|
||||||
|
# 主机host: ipv4 ipv6 域名
|
||||||
|
host: ^_^host^_^
|
||||||
|
# 端口
|
||||||
|
port: ^_^port^_^
|
||||||
|
platform: oracle
|
||||||
|
username: ^_^username^_^
|
||||||
|
password: ^_^password^_^
|
||||||
|
database: ^_^database^_^
|
||||||
|
timeout: ^_^timeout^_^
|
||||||
|
# SQL查询方式: oneRow, multiRow, columns
|
||||||
|
queryType: columns
|
||||||
|
# sql
|
||||||
|
sql: select * from sys.props$
|
||||||
|
url: ^_^url^_^
|
||||||
@@ -115,7 +115,7 @@ metrics:
|
|||||||
priority: 1
|
priority: 1
|
||||||
fields:
|
fields:
|
||||||
# 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位
|
# 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位
|
||||||
- field: connection
|
- field: user_connection
|
||||||
type: 0
|
type: 0
|
||||||
unit: 连接数
|
unit: 连接数
|
||||||
protocol: jdbc
|
protocol: jdbc
|
||||||
@@ -132,5 +132,5 @@ metrics:
|
|||||||
# SQL查询方式: oneRow, multiRow, columns
|
# SQL查询方式: oneRow, multiRow, columns
|
||||||
queryType: oneRow
|
queryType: oneRow
|
||||||
# sql
|
# sql
|
||||||
sql: SELECT cntr_value as connection FROM sys.dm_os_performance_counters WHERE object_name = 'SQLServer:General Statistics' AND counter_name = 'User Connections';
|
sql: SELECT cntr_value as user_connection FROM sys.dm_os_performance_counters WHERE object_name = 'SQLServer:General Statistics' AND counter_name = 'User Connections';
|
||||||
url: ^_^url^_^
|
url: ^_^url^_^
|
||||||
36
manager/src/main/resources/define/param/oracle.yml
Normal file
36
manager/src/main/resources/define/param/oracle.yml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
app: oracle
|
||||||
|
param:
|
||||||
|
- field: host
|
||||||
|
name: 主机Host
|
||||||
|
type: host
|
||||||
|
required: true
|
||||||
|
- field: port
|
||||||
|
name: 端口
|
||||||
|
type: number
|
||||||
|
range: '[0,65535]'
|
||||||
|
required: true
|
||||||
|
defaultValue: 3306
|
||||||
|
placeholder: '请输入端口'
|
||||||
|
- field: timeout
|
||||||
|
name: 查询超时时间
|
||||||
|
type: number
|
||||||
|
required: false
|
||||||
|
defaultValue: 3000
|
||||||
|
placeholder: '查询超时时间'
|
||||||
|
- field: database
|
||||||
|
name: 数据库名称
|
||||||
|
type: text
|
||||||
|
required: false
|
||||||
|
- field: username
|
||||||
|
name: 用户名
|
||||||
|
type: text
|
||||||
|
limit: 20
|
||||||
|
required: false
|
||||||
|
- field: password
|
||||||
|
name: 密码
|
||||||
|
type: password
|
||||||
|
required: false
|
||||||
|
- field: url
|
||||||
|
name: URL
|
||||||
|
type: text
|
||||||
|
required: false
|
||||||
@@ -27,8 +27,8 @@ spring:
|
|||||||
on-profile: prod
|
on-profile: prod
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
username: admin
|
username: root
|
||||||
password: admin
|
password: 123456
|
||||||
url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||||
platform: mysql
|
platform: mysql
|
||||||
hikari:
|
hikari:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd
|
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd
|
||||||
http://maven.apache.org/ASSEMBLY/2.0.0 ">
|
http://maven.apache.org/ASSEMBLY/2.0.0 ">
|
||||||
<!--必填,会追加到打包文件名称的末尾-->
|
<!--必填,会追加到打包文件名称的末尾-->
|
||||||
<id>1.0-beta.5</id>
|
<id>1.0-beta.6</id>
|
||||||
<!--打包类型,可以设置多种类型,打包的时候不同的类型都会打包打出来-->
|
<!--打包类型,可以设置多种类型,打包的时候不同的类型都会打包打出来-->
|
||||||
<formats>
|
<formats>
|
||||||
<format>tar</format>
|
<format>tar</format>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: 1234
|
password: 123456
|
||||||
url: jdbc:mysql://mysql:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
url: jdbc:mysql://mysql:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false
|
||||||
platform: mysql
|
platform: mysql
|
||||||
hikari:
|
hikari:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ services:
|
|||||||
- "3306:3306"
|
- "3306:3306"
|
||||||
environment:
|
environment:
|
||||||
TZ: Asia/Shanghai
|
TZ: Asia/Shanghai
|
||||||
MYSQL_ROOT_PASSWORD: 1234
|
MYSQL_ROOT_PASSWORD: 123456
|
||||||
volumes:
|
volumes:
|
||||||
- ./dbdata/mysqldata:/var/lib/mysql/
|
- ./dbdata/mysqldata:/var/lib/mysql/
|
||||||
- ./conf/sql:/docker-entrypoint-initdb.d/
|
- ./conf/sql:/docker-entrypoint-initdb.d/
|
||||||
@@ -35,7 +35,7 @@ services:
|
|||||||
- heartzbeat
|
- heartzbeat
|
||||||
|
|
||||||
hertzbeat:
|
hertzbeat:
|
||||||
image: "tancloud/hertzbeat:1.0-beta.5"
|
image: "tancloud/hertzbeat:1.0-beta.6"
|
||||||
container_name: hertzbeat
|
container_name: hertzbeat
|
||||||
hostname: hertzbeat
|
hostname: hertzbeat
|
||||||
restart: always
|
restart: always
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ FROM openjdk:8-alpine
|
|||||||
|
|
||||||
MAINTAINER tomsun28 "tomsun28@outlook.com"
|
MAINTAINER tomsun28 "tomsun28@outlook.com"
|
||||||
|
|
||||||
ADD hertzbeat-1.0-beta.5.tar /opt/
|
ADD hertzbeat-1.0-beta.6.tar /opt/
|
||||||
|
|
||||||
RUN apk add --no-cache tzdata
|
RUN apk add --no-cache tzdata
|
||||||
|
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ public class TdEngineDataStorage implements DisposableBean {
|
|||||||
String createTableSql = String.format(CREATE_SUPER_TABLE_SQL, superTable, fieldSqlBuilder);
|
String createTableSql = String.format(CREATE_SUPER_TABLE_SQL, superTable, fieldSqlBuilder);
|
||||||
try {
|
try {
|
||||||
assert statement != null;
|
assert statement != null;
|
||||||
|
log.info("[tdengine-data]: create {} use sql: {}.", superTable, createTableSql);
|
||||||
statement.execute(createTableSql);
|
statement.execute(createTableSql);
|
||||||
statement.execute(insertDataSql);
|
statement.execute(insertDataSql);
|
||||||
} catch (Exception createTableException) {
|
} catch (Exception createTableException) {
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div nz-row nzGutter="16">
|
<div nz-row nzGutter="16">
|
||||||
<div nz-col nzSpan="8"><p style="text-align: right">最近更新时间</p></div>
|
<div nz-col nzSpan="8"><p style="text-align: right">更新时间</p></div>
|
||||||
<div nz-col nzSpan="16"
|
<div nz-col nzSpan="16"
|
||||||
><p style="text-align: left">{{ monitor?.gmtUpdate | date: 'YYYY-MM-dd HH:mm:ss' }}</p></div
|
><p style="text-align: left">{{ monitor?.gmtUpdate | date: 'YYYY-MM-dd HH:mm:ss' }}</p></div
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -160,7 +160,7 @@
|
|||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
|
|
||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzSpan="7" nzFor="detect" nzTooltipTitle="新增监控前是否先探测检查监控可用性"> 是否探测 </nz-form-label>
|
<nz-form-label nzSpan="7" nzFor="detect" nzTooltipTitle="新增监控前是否先探测检查监控可用性"> 测试连接 </nz-form-label>
|
||||||
<nz-form-control nzSpan="8">
|
<nz-form-control nzSpan="8">
|
||||||
<nz-switch [(ngModel)]="detected" name="detect" id="detect"></nz-switch>
|
<nz-switch [(ngModel)]="detected" name="detect" id="detect"></nz-switch>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
|
|
||||||
<div nz-row>
|
<div nz-row>
|
||||||
<div nz-col nzSpan="8" nzOffset="9">
|
<div nz-col nzSpan="8" nzOffset="9">
|
||||||
<button nz-button nzType="primary" type="submit" (click)="onDetect(editForm.form)"> 探测 </button>
|
<button nz-button nzType="primary" type="submit" (click)="onDetect(editForm.form)"> 测试 </button>
|
||||||
<button nz-button nzType="primary" type="submit" (click)="onSubmit(editForm.form)"> 确定 </button>
|
<button nz-button nzType="primary" type="submit" (click)="onSubmit(editForm.form)"> 确定 </button>
|
||||||
<button nz-button nzType="primary" type="reset" (click)="onCancel()"> 取消 </button>
|
<button nz-button nzType="primary" type="reset" (click)="onCancel()"> 取消 </button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -169,7 +169,7 @@
|
|||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
|
|
||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzSpan="7" nzFor="detect" nzTooltipTitle="新增监控前是否先探测检查监控可用性"> 是否探测 </nz-form-label>
|
<nz-form-label nzSpan="7" nzFor="detect" nzTooltipTitle="新增监控前是否先探测检查监控可用性"> 测试连接 </nz-form-label>
|
||||||
<nz-form-control nzSpan="8">
|
<nz-form-control nzSpan="8">
|
||||||
<nz-switch [(ngModel)]="detected" name="detect" id="detect"></nz-switch>
|
<nz-switch [(ngModel)]="detected" name="detect" id="detect"></nz-switch>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
@@ -186,7 +186,7 @@
|
|||||||
|
|
||||||
<div nz-row>
|
<div nz-row>
|
||||||
<div nz-col nzSpan="8" nzOffset="9">
|
<div nz-col nzSpan="8" nzOffset="9">
|
||||||
<button nz-button nzType="primary" type="submit" (click)="onDetect(newForm.form)"> 探测 </button>
|
<button nz-button nzType="primary" type="submit" (click)="onDetect(newForm.form)"> 测试 </button>
|
||||||
<button nz-button nzType="primary" type="submit" (click)="onSubmit(newForm.form)"> 确定 </button>
|
<button nz-button nzType="primary" type="submit" (click)="onSubmit(newForm.form)"> 确定 </button>
|
||||||
<button nz-button nzType="primary" type="reset" (click)="onCancel()"> 取消 </button>
|
<button nz-button nzType="primary" type="reset" (click)="onCancel()"> 取消 </button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user