Skip to content

Commit

Permalink
[webapp,home] fix middle category icon and update home doc (#283)
Browse files Browse the repository at this point in the history
  [webapp] fix middle category icon

  [home]update help docs

  [home]update logo png

  [home]add ssl-practice doc and update icon
  • Loading branch information
tomsun28 committed Sep 11, 2022
1 parent bb9977a commit 8df8030
Show file tree
Hide file tree
Showing 40 changed files with 253 additions and 52 deletions.
74 changes: 74 additions & 0 deletions home/blog/2022-09-04-hertzbeat-v1.1.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
title: 云监控系统 HertzBeat v1.1.3 发布!
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]
---

Home: hertzbeat.com | tancloud.cn

Hi gays! HertzBeat v1.1.3 is coming. This version supports kafka monitor, ssl certificate expired monitor and more. Fixed several bugs and improved the overall stable usability.

Only one docker command is needed to install and experience heartbeat:
`docker run -d -p 1157:1157 --name hertzbeat tancloud/hertzbeat`

Thanks to the contributors! 👍👍

Feature:

1. [[web-app]feature:update monitors layout, support host copy to clipboard #260](https://github.com/dromara/hertzbeat/pull/260)
2. [[monitor] feature: support apache kafka monitor #263](https://github.com/dromara/hertzbeat/pull/263) contribute by @wang1027-wqh
3. [[webapp] support history chart query 3 mouth time range #265](https://github.com/dromara/hertzbeat/pull/265) issue by @ericfrol
4. [[monitor] support ssl certificate expired monitor #266](https://github.com/dromara/hertzbeat/pull/266) suggest by @noear
5. [[web-app] update default interval 600s to 120s #268](https://github.com/dromara/hertzbeat/pull/268)
6. [[web-app] update layout ui - help button, nav menu #272](https://github.com/dromara/hertzbeat/pull/272)
7. [[alert,webapp] support delete all alerts at once. #273](https://github.com/dromara/hertzbeat/pull/273) issue by @ericfrol
8. [[web-app] update home background image #276](https://github.com/dromara/hertzbeat/pull/276)

Bugfix.

1. [[docs] fix extend-http-jsonpath.md parseScript error #262](https://github.com/dromara/hertzbeat/pull/262) contribute by @woshiniusange .
2. [[monitor] update help docs, refactor redis metrics name #264](https://github.com/dromara/hertzbeat/pull/264)
3. [[manager] bugfix alert tags is null when tags map key normal value null. #270](https://github.com/dromara/hertzbeat/pull/270) issue by https://gitee.com/hello_brother_niu
4. [[alert] bugfix: the alert global preset config do not take effect #275](https://github.com/dromara/hertzbeat/pull/275) issue by https://gitee.com/hello_brother_niu

Online https://console.tancloud.cn.

Have Fun!
----

## V1.1.3
官网: hertzbeat.com | tancloud.cn

大家好,HertzBeat v1.1.3 发布啦!这个版本支持了apache kafka监控,SSL证书过期监控等。修复了若干bug,提升整体稳定性。

只需要一条docker命令即可安装体验heartbeat :
`docker run -d -p 1157:1157 --name hertzbeat tancloud/hertzbeat`

感谢hertzbeat贡献者们的贡献!👍👍

Feature:

1. [[web-app]feature:update monitors layout, support host copy to clipboard #260](https://github.com/dromara/hertzbeat/pull/260)
2. [[monitor] feature: support apache kafka monitor #263](https://github.com/dromara/hertzbeat/pull/263) contribute by @wang1027-wqh
3. [[webapp] support history chart query 3 mouth time range #265](https://github.com/dromara/hertzbeat/pull/265) issue by @ericfrol
4. [[monitor] support ssl certificate expired monitor #266](https://github.com/dromara/hertzbeat/pull/266) suggest by @noear
5. [[web-app] update default interval 600s to 120s #268](https://github.com/dromara/hertzbeat/pull/268)
6. [[web-app] update layout ui - help button, nav menu #272](https://github.com/dromara/hertzbeat/pull/272)
7. [[alert,webapp] support delete all alerts at once. #273](https://github.com/dromara/hertzbeat/pull/273) issue by @ericfrol
8. [[web-app] update home background image #276](https://github.com/dromara/hertzbeat/pull/276)

Bugfix.

1. [[docs] fix extend-http-jsonpath.md parseScript error #262](https://github.com/dromara/hertzbeat/pull/262) contribute by @woshiniusange .
2. [[monitor] update help docs, refactor redis metrics name #264](https://github.com/dromara/hertzbeat/pull/264)
3. [[manager] bugfix alert tags is null when tags map key normal value null. #270](https://github.com/dromara/hertzbeat/pull/270) issue by https://gitee.com/hello_brother_niu
4. [[alert] bugfix: the alert global preset config do not take effect #275](https://github.com/dromara/hertzbeat/pull/275) issue by https://gitee.com/hello_brother_niu

Online https://console.tancloud.cn.


Have Fun!
----
123 changes: 123 additions & 0 deletions home/blog/2022-09-10-ssl-practice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
title: SSL证书过期监控最佳实践
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]
---

先祝看到的同学中秋快乐,身体健康,在身体健康的基础上尽量暴富。

进入正题,现在大部分网站都默认支持 HTTPS,我们申请的证书一般是3个月或者1年,很容易随着时间的流逝SSL证书过期了我们却没有第一时间发现,或者在过期之前没有及时更新证书。

今天这篇文章介绍如果使用 hertzbeat 监控系统来检测我们网站的SSL证书有效期,当证书过期时或证书快过期前几天,给我们发告警消息。

#### HertzBeat是什么

HertzBeat 一个拥有强大自定义监控能力,无需Agent的实时监控系统。网站监测,PING连通性,端口可用性,数据库,操作系统,中间件,API监控,阈值告警,告警通知(邮件微信钉钉飞书)。

**官网: https://hertzbeat.com | https://tancloud.cn**

github: https://github.com/dromara/hertzbeat
gitee: https://gitee.com/dromara/hertzbeat

#### 安装 HertzBeat

1.如果不想安装可以直接使用云服务 [TanCloud探云 console.tancloud.cn](https://console.tancloud.cn)

2. `docker` 环境仅需一条命令即可安装

`docker run -d -p 1157:1157 --name hertzbeat tancloud/hertzbeat`

3. 安装成功浏览器访问 `localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat`

#### 监控SSL证书

1. 点击新增SSL证书监控

> 系统页面 -> 监控菜单 -> SSL证书 -> 新增SSL证书

![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/bd53f343a5b54feab62e71458d076441~tplv-k3u1fbpfcp-zoom-1.image)

2. 配置监控网站

> 我们这里举例监控百度网站, 配置监控host域名,名称,采集间隔等。
> 点击确定 注意⚠️新增前默认会先去测试网站连接性,连接成功才会新增,当然也可以把**是否测试**按钮置灰。
![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ad1154670648413bb82c8bdeb5b13609~tplv-k3u1fbpfcp-zoom-1.image)

3. 查看检测指标数据

> 在监控列表可以查看监控状态,进监控详情可以查看指标数据图表等。

![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/f874b45e909c4bb0acdd28b3fb034a61~tplv-k3u1fbpfcp-zoom-1.image)


![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ef5d7443f8c04818ae5aa28d421203be~tplv-k3u1fbpfcp-zoom-1.image)



4. 设置阈值(证书过期时触发)

> 系统页面 -> 告警 -> 告警阈值 -> 新增阈值

![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/8d6205172d43463aa34e534477f132f1~tplv-k3u1fbpfcp-zoom-1.image)

> 配置阈值,选择SSL证书指标对象,配置告警表达式-当指标`expired``true`触发,即`equals(expired,"true")` , 设置告警级别通知模版信息等。

![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/83d17b381d994f26a6240e01915b2001~tplv-k3u1fbpfcp-zoom-1.image)

> 关联阈值与监控, 在阈值列表设置此阈值应用于哪些监控。

![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/9b9063d7bcf9454387be0491fc382bd1~tplv-k3u1fbpfcp-zoom-1.image)




5. 设置阈值(证书过期前一周触发)

> 同理如上,新增配置阈值,配置告警表达式-当指标有效期时间戳 `end_timestamp``now()`函数为当前时间戳,若配置提前一周触发告警即:`end_timestamp <= (now() + 604800000)` , 其中 `604800000` 为7天总时间差毫秒值。

![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/0d6f837f57c247e09f668f60eff4a0ff~tplv-k3u1fbpfcp-zoom-1.image)

> 最终可以在告警中心看到已触发的告警。

![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/5a61b23127524976b2c209ce0ca6a339~tplv-k3u1fbpfcp-zoom-1.image)


6. 告警通知(通过钉钉微信飞书等及时通知)

> 监控系统 -> 告警通知 -> 新增接收人

![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/7f36956060ef410a82bbecafcbb2957f~tplv-k3u1fbpfcp-zoom-1.image)

钉钉微信飞书等token配置可以参考帮助文档

https://hertzbeat.com/docs/help/alert_dingtalk
https://tancloud.cn/docs/help/alert_dingtalk

> 告警通知 -> 新增告警通知策略 -> 将刚才配置的接收人启用通知

![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/d976343e81f843138344a039f3aff8a3~tplv-k3u1fbpfcp-zoom-1.image)

7. OK 当阈值触发后我们就可以收到对应告警消息啦,如果没有配通知,也可以在告警中心查看告警信息。

----

#### 完!

监控SSL证书的实践就到这里,当然对heartbeat来说这个功能只是冰山一角,如果您觉得heartbeat这个开源项目不错的话欢迎给我们在GitHub Gitee star哦,灰常感谢。感谢老铁们的支持。笔芯!

**github: https://github.com/dromara/hertzbeat**

**gitee: https://gitee.com/dromara/hertzbeat**
4 changes: 4 additions & 0 deletions home/docs/help/alert_threshold_expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ equals(str1,str2)
丰富的操作符让我们可以很自由的定义表达式。
注意⚠️ 字符串的相等请用 `equals(str1,str2)` 数字类型的相等判断请用== 或 !=

#### 表达式函数库列表

参考: https://www.yuque.com/boyan-avfmj/aviatorscript/ashevw

#### 支持的环境变量
> 环境变量即指标值等支持的变量,用于在表达式中,阈值计算判断时会将变量替换成实际值进行计算
Expand Down
5 changes: 4 additions & 1 deletion home/docs/help/jvm.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ sidebar_label: JVM虚拟机

### JVM应用开启JMX协议步骤

1. 应用启动时添加JVM参数 ⚠️注意可自定义暴露端口
1. 应用启动时添加JVM参数 ⚠️注意可自定义暴露端口,对外IP

参考文档: https://docs.oracle.com/javase/1.5.0/docs/guide/management/agent.html#remote

```shell
-Djava.rmi.server.hostname=对外ip地址
-Dcom.sun.management.jmxremote.port=9999
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
Expand Down
2 changes: 1 addition & 1 deletion home/docs/help/tomcat.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ sidebar_label: Tomcat监控

### Tomcat开启JMX协议步骤

1. 搭建好tomcat后,进入tomcat下的bin目录,修改catalina.sh文件
1. 搭建好tomcat后,进入tomcat下的bin目录,修改catalina.sh文件 注意⚠️替换IP地址

2. vim catalina.sh

Expand Down
6 changes: 3 additions & 3 deletions home/docs/others/contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ sidebar_label: 交流联系
## 微信交流群

加微信号 tan-cloud 或 扫描下面账号二维码拉您进微信群。
<img alt="tan-cloud" src="https://cdn.jsdelivr.net/gh/dromara/hertzbeat@gh-pages/img/docs/help/tan-cloud-wechat.jpg" width="400"/>
<img alt="tan-cloud" src="/img/docs/help/tan-cloud-wechat.jpg" width="400"/>

## 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="400"/>
<img alt="tan-cloud" src="/img/docs/help/qq-qr.jpg" width="400"/>

## 交流网站

Expand All @@ -29,7 +29,7 @@ sidebar_label: 交流联系

## 微信公众号

<img alt="tan-cloud" src="https://cdn.jsdelivr.net/gh/dromara/hertzbeat/home/static/img/wechat.png" width="400"/>
<img alt="tan-cloud" src="/img/wechat.png" width="400"/>


## 其它联系
Expand Down
3 changes: 2 additions & 1 deletion home/docs/start/docker-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sidebar_label: Docker方式部署
注意⚠️(若使用邮件告警,需替换里面的邮件服务器参数。若使用MYSQL数据源,需替换里面的datasource参数 参见[H2数据库切换为MYSQL](mysql-init)
具体替换参数如下:
```
warehouse.store.td-engine.enable
warehouse.store.td-engine.url
warehouse.store.td-engine.username
warehouse.store.td-engine.password
Expand Down Expand Up @@ -167,6 +167,7 @@ $ docker run -d -p 1157:1157 \
- `-v /opt/logs:/opt/hertzbeat/logs` : (可选,不需要可删除)挂载日志文件到本地主机,保证日志不会因为容器的创建删除而丢失,方便查看
- `-v /opt/application.yml:/opt/hertzbeat/config/application.yml` : (可选,不需要可删除)挂载上上一步修改的本地配置文件到容器中,即使用本地配置文件覆盖容器配置文件。我们需要修改此配置文件的MYSQL,TDengine配置信息来连接外部服务。
- `-v /opt/sureness.yml:/opt/hertzbeat/config/sureness.yml` : (可选,不需要可删除)挂载上一步修改的账户配置文件到容器中,若无修改账户需求可删除此命令参数。
- 注意⚠️ 挂载文件时,前面参数为你自定义本地文件地址,后面参数为docker容器内文件地址(固定)
- `--name hertzbeat` : 命名容器名称 hertzbeat
- `tancloud/hertzbeat` : 使用拉取最新的的HertzBeat官方发布的应用镜像来启动容器,版本可查看[官方镜像仓库](https://hub.docker.com/r/tancloud/hertzbeat/tags)

Expand Down
4 changes: 2 additions & 2 deletions home/docs/start/mysql-init.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
id: mysql-init
title: 依赖的关系型数据库H2切换为MYSQL
sidebar_label: H2数据库切换为MYSQL
sidebar_label: H2切换为MYSQL
---
MYSQL是一款值得信赖的关系型数据库,HertzBeat除了支持使用默认内置的H2数据库外,还可以使用MYSQL存储监控信息,告警信息,配置信息等结构化关系数据。
MYSQL是一款值得信赖的关系型数据库,HertzBeat除了支持使用默认内置的H2数据库外,还可以切换为使用MYSQL存储监控信息,告警信息,配置信息等结构化关系数据。

> 如果您已有MYSQL环境,可直接跳到数据库创建那一步。
Expand Down
1 change: 1 addition & 0 deletions home/docs/start/package-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ sidebar_label: 安装包方式部署
注意⚠️(若使用邮件告警,需替换里面的邮件服务器参数。若使用MYSQL数据源,需替换里面的datasource参数 参见[H2数据库切换为MYSQL](mysql-init)
具体替换参数如下:
```
warehouse.store.td-engine.enable
warehouse.store.td-engine.url
warehouse.store.td-engine.username
warehouse.store.td-engine.password
Expand Down
5 changes: 3 additions & 2 deletions home/docs/start/tdengine-init.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
id: tdengine-init
title: 依赖服务TDengine安装初始化
sidebar_label: TDengine安装初始化(可选)
sidebar_label: TDengine初始化(可选)
---
TDengine是一款国产的开源物联网时序型数据库,我们使用其替换了InfluxDb,来存储采集到的监控指标历史数据。
TDengine是一款开源物联网时序型数据库,我们用其存储采集到的监控指标历史数据。 注意⚠️ 2.4.x版本。
注意⚠️ TDengine为可选项,未配置则无历史图表数据。

> 如果您已有TDengine环境,可直接跳到创建数据库实例那一步。
Expand Down Expand Up @@ -67,6 +67,7 @@ $ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp \
替换里面的`warehouse.store.td-engine`数据源参数,URL账户密码

```
warehouse.store.td-engine.enable
warehouse.store.td-engine.url
warehouse.store.td-engine.username
warehouse.store.td-engine.password
Expand Down
10 changes: 5 additions & 5 deletions home/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const organizationName = 'dromara' // Usually your GitHub org/user name.
const projectName = 'hertzbeat' // Usually your repo name.
const branch = 'master'
const repoUrl = `https://github.com/dromara/${projectName}`
const cdnUrl = 'https://cdn.jsdelivr.net/gh/dromara/hertzbeat@gh-pages/'
const cdnUrl = 'https://cdn.jsdelivr.net/gh/dromara/hertzbeat@gh-pages'

module.exports = {
title: 'HertzBeat',
Expand All @@ -13,7 +13,7 @@ module.exports = {
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
favicon: cdnUrl + 'img/tancloud-logo.svg',
favicon: '/img/tancloud-logo.svg',
organizationName,
projectName,
customFields: {
Expand All @@ -25,7 +25,7 @@ module.exports = {
locales: ['zh-cn', 'en'],
},
themeConfig: {
image: cdnUrl + 'img/tancloud-logo.svg',
image: '/img/tancloud-logo.svg',
liveCodeBlock: {
playgroundPosition: 'bottom',
},
Expand Down Expand Up @@ -63,7 +63,7 @@ module.exports = {
title: 'HertzBeat',
logo: {
alt: '易用友好的高性能监控云',
src: cdnUrl + 'img/tancloud-logo.svg',
src: '/img/tancloud-logo.svg',
},
items: [
{
Expand Down Expand Up @@ -200,7 +200,7 @@ module.exports = {
],
logo: {
alt: 'TANCLOUD探云-易用友好的高性能监控云',
src: 'https://cdn.jsdelivr.net/gh/dromara/hertzbeat@gh-pages/img/planet.jpg',
src: '/img/planet.jpg',
href: 'https://github.com/dromara/hertzbeat',
},
copyright:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,12 @@ sidebar_label: JVM

### JVM App Enable JMX Protocol

1. Add JVM `VM options` When Start Server
1. Add JVM `VM options` When Start Server ⚠️ customIP

Refer: https://docs.oracle.com/javase/1.5.0/docs/guide/management/agent.html#remote

```shell
-Djava.rmi.server.hostname=yourIP
-Dcom.sun.management.jmxremote.port=9999
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ video tutorial of installation and deployment: [HertzBeat installation and deplo
Note⚠️(If use email to alert, please replace the mail server parameter. If use MYSQL data source, replace the datasource parameters inside refer to[H2 database switch to MYSQL](mysql-init)
Specific replacement parameters is as follows:
```
warehouse.store.td-engine.enable
warehouse.store.td-engine.url
warehouse.store.td-engine.username
warehouse.store.td-engine.password
Expand Down
Loading

0 comments on commit 8df8030

Please sign in to comment.