Skip to content

Commit

Permalink
support monitoring red hat os metrics (#1012)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsun28 authored Jun 5, 2023
1 parent 91d9979 commit 9fe6358
Show file tree
Hide file tree
Showing 5 changed files with 400 additions and 6 deletions.
2 changes: 1 addition & 1 deletion home/docs/advanced/extend-http.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_label: HTTP Protocol Custom Monitoring
> From [Custom Monitoring](extend-point), you are familiar with how to customize types, Metrics, protocols, etc. Here we will introduce in detail how to use HTTP protocol to customize Metric monitoring
### HTTP protocol collection process
**call HTTP interface**】->【**response verification **】->【**parse reponse data**】->【**default method parsing|JsonPath script parsing | XmlPath parsing(todo) | Prometheus parsing(todo)**】->【**Metric data extraction**
**call HTTP interface**】->【**response verification**】->【**parse reponse data**】->【**default method parsing|JsonPath script parsing | XmlPath parsing(todo) | Prometheus parsing**】->【**Metric data extraction**

It can be seen from the process that we define a monitoring type of HTTP protocol. We need to configure HTTP request parameters, configure which Metrics to obtain, and configure the parsing method and parsing script for response data.
HTTP protocol supports us to customize HTTP request path, request header, request parameters, request method, request body, etc.
Expand Down
4 changes: 2 additions & 2 deletions home/docs/advanced/extend-ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_label: SSH Protocol Custom Monitoring
> SSH protocol custom monitoring allows us to easily monitor and collect the Linux Metrics we want by writing sh command script.
### SSH protocol collection process
**System directly connected to Linux**】->【**Run shell command script statement**】->【**parse reponse data: oneRow, multiRow**】->【**Metric data extraction**
**System directly connected to Linux**】->【**Run shell command script statement**】->【**parse response data: oneRow, multiRow**】->【**Metric data extraction**

It can be seen from the process that we define a monitoring type of SSH protocol. We need to configure SSH request parameters, configure which Metrics to obtain, and configure query script statements.

Expand Down Expand Up @@ -39,7 +39,7 @@ Here the Metric field and the response data can be mapped into a row of collecte
eg:
Linux memory related Metric fields queried:total-Total memory, used-Used memory,free-Free memory, buff-cache-Cache size, available-Available memory
Memory indicaotr original query command:`free -m`, Console response:
Memory metrics original query command:`free -m`, Console response:
```shell
total used free shared buff/cache available
Mem: 7962 4065 333 1 3562 3593
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_label: HTTP协议自定义监控
> [自定义监控](extend-point)了解熟悉了怎么自定义类型,指标,协议等,这里我们来详细介绍下用HTTP协议自定义指标监控。
### HTTP协议采集流程
**HTTP接口调用**】->【**响应校验**】->【**响应数据解析**】->【**默认方式解析|JsonPath脚本解析 | XmlPath解析(todo) | Prometheus解析(todo)**】->【**指标数据提取**
**HTTP接口调用**】->【**响应校验**】->【**响应数据解析**】->【**默认方式解析|JsonPath脚本解析 | XmlPath解析(todo) | Prometheus解析**】->【**指标数据提取**

由流程可见,我们自定义一个HTTP协议的监控类型,需要配置HTTP请求参数,配置获取哪些指标,对响应数据配置解析方式和解析脚本。
HTTP协议支持我们自定义HTTP请求路径,请求header,请求参数,请求方式,请求体等。
Expand Down
4 changes: 2 additions & 2 deletions manager/src/main/resources/define/app-coreos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ app: coreos
# The monitoring i18n name
# 监控类型国际化名称
name:
zh-CN: CoreOS
en-US: CoreOS
zh-CN: Fedora CoreOS
en-US: Fedora CoreOS
# 监控所需输入参数定义(根据定义渲染页面UI)
# Input params define for monitoring(render web ui by the definition)
params:
Expand Down
Loading

0 comments on commit 9fe6358

Please sign in to comment.