Skip to content

Commit 2316990

Browse files
authored
init argus website (#39)
* [home] init use hertzbeat website * [home] update website * update readme * [home] update website * [home] update website * [home] update website
1 parent 6038ed9 commit 2316990

File tree

305 files changed

+27548
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

305 files changed

+27548
-1
lines changed

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
> Argus 开源数据库一体化监控平台,致力于监控所有数据库。
44
5+
官网: [walkingfunny.com](https://www.walkingfunny.com/)
56

67
## 🐕 快速开始
78

@@ -19,4 +20,7 @@
1920

2021
#### 前端本地代码启动
2122

22-
1. todo
23+
1. 需安装 `nodejs npm` 环境
24+
2.`web-app` 目录下执行 `npm install`
25+
3. 启动前端服务 `npm run dev`, 浏览器访问 http://localhost:9527 即可
26+
4. 默认账户密码 `argus/argus`

home/.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

home/CNAME

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tancloud.cn

home/README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# argusDBM Website
2+
3+
This website is built using [Docusaurus 2](https://docusaurus.io/).
4+
Learn From [webdriverio](https://webdriver.io/)
5+
6+
## Installation
7+
8+
```console
9+
yarn install
10+
```
11+
12+
## Local Development
13+
14+
```console
15+
yarn start
16+
```
17+
18+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
19+
20+
## Build
21+
22+
```console
23+
yarn build
24+
```
25+
26+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
27+
28+
## Deployment
29+
30+
```console
31+
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
32+
OR
33+
USE_SSH=true yarn deploy
34+
```
35+
36+
## Deployment Gitee
37+
```
38+
GITHUB_HOST=gitee.com USE_SSH=true yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

home/babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
}

home/blog/2023-03-23-argus.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: 开源数据库一体化监控平台 ArgusDBM 正式发布
3+
author: tom
4+
author_title: tom
5+
author_url: https://github.com/tomsun28
6+
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
7+
tags: [opensource]
8+
---
9+
10+
# 开源数据库一体化监控平台 ArgusDBM 正式发布
11+
12+
> Argus 开源数据库一体化监控平台,致力于监控所有数据库。
13+
14+
15+
+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
---
2+
id: extend-http-default
3+
title: HTTP协议系统默认解析方式
4+
sidebar_label: 系统默认解析方式
5+
---
6+
> HTTP接口调用获取响应数据后,用argusDBM默认的解析方式去解析响应数据。
7+
8+
**此需接口响应数据结构符合argusDBM指定的数据结构规则**
9+
10+
### argusDBM数据格式规范
11+
注意⚠️ 响应数据为JSON
12+
13+
单层格式:key-value
14+
```json
15+
{
16+
"metricName1": "metricValue",
17+
"metricName2": "metricValue",
18+
"metricName3": "metricValue",
19+
"metricName4": "metricValue"
20+
}
21+
```
22+
多层格式:数组里面套key-value
23+
```json
24+
[
25+
{
26+
"metricName1": "metricValue",
27+
"metricName2": "metricValue",
28+
"metricName3": "metricValue",
29+
"metricName4": "metricValue"
30+
},
31+
{
32+
"metricName1": "metricValue",
33+
"metricName2": "metricValue",
34+
"metricName3": "metricValue",
35+
"metricName4": "metricValue"
36+
}
37+
]
38+
```
39+
样例:
40+
查询自定义系统的CPU信息,其暴露接口为 `/metrics/cpu`,我们需要其中的`hostname,core,useage`指标
41+
若只有一台虚拟机,其单层格式为:
42+
```json
43+
{
44+
"hostname": "linux-1",
45+
"core": 1,
46+
"usage": 78.0,
47+
"allTime": 200,
48+
"runningTime": 100
49+
}
50+
```
51+
若有多台虚拟机,其多层格式为:
52+
```json
53+
[
54+
{
55+
"hostname": "linux-1",
56+
"core": 1,
57+
"usage": 78.0,
58+
"allTime": 200,
59+
"runningTime": 100
60+
},
61+
{
62+
"hostname": "linux-2",
63+
"core": 3,
64+
"usage": 78.0,
65+
"allTime": 566,
66+
"runningTime": 34
67+
},
68+
{
69+
"hostname": "linux-3",
70+
"core": 4,
71+
"usage": 38.0,
72+
"allTime": 500,
73+
"runningTime": 20
74+
}
75+
]
76+
```
77+
78+
**对应的监控配置定义文件YML可以配置为如下**
79+
80+
```yaml
81+
# 此监控类型所属类别:service-应用服务监控 db-数据库监控 custom-自定义监控 os-操作系统监控
82+
category: custom
83+
# 监控应用类型(与文件名保持一致) eg: linux windows tomcat mysql aws...
84+
app: example
85+
name:
86+
zh-CN: 模拟应用类型
87+
en-US: EXAMPLE APP
88+
# 参数映射map. 这些为输入参数变量,即可以用^_^host^_^的形式写到后面的配置中,系统自动变量值替换
89+
# type是参数类型: 0-number数字, 1-string明文字符串, 2-secret加密字符串
90+
# 强制固定必须参数 - host
91+
configmap:
92+
- key: host
93+
type: 1
94+
- key: port
95+
type: 0
96+
# 指标组列表
97+
metrics:
98+
# 第一个监控指标组 cpu
99+
# 注意:内置监控指标有 (responseTime - 响应时间)
100+
- name: cpu
101+
# 指标组调度优先级(0-127)越小优先级越高,优先级低的指标组会等优先级高的指标组采集完成后才会被调度,相同优先级的指标组会并行调度采集
102+
# 优先级为0的指标组为可用性指标组,即它会被首先调度,采集成功才会继续调度其它指标组,采集失败则中断调度
103+
priority: 0
104+
# 指标组中的具体监控指标
105+
fields:
106+
# 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位
107+
- field: hostname
108+
type: 1
109+
instance: true
110+
- field: usage
111+
type: 0
112+
unit: '%'
113+
- field: core
114+
type: 0
115+
# 监控采集使用协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk
116+
protocol: http
117+
# 当protocol为http协议时具体的采集配置
118+
http:
119+
# 主机host: ipv4 ipv6 域名
120+
host: ^_^host^_^
121+
# 端口
122+
port: ^_^port^_^
123+
# url请求接口路径
124+
url: /metrics/cpu
125+
# 请求方式 GET POST PUT DELETE PATCH
126+
method: GET
127+
# 是否启用ssl/tls,即是http还是https,默认false
128+
ssl: false
129+
# 响应数据解析方式: default-系统规则,jsonPath-jsonPath脚本,website-网站可用性指标监控
130+
# 这里使用argusDBM默认解析
131+
parseType: default
132+
```

0 commit comments

Comments
 (0)