You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hertzbeat.apache.org by "tomorrowshipyltm (via GitHub)" <gi...@apache.org> on 2024/07/03 07:01:30 UTC
[D] Simplify the monitor template [hertzbeat]
GitHub user tomorrowshipyltm created a discussion: Simplify the monitor template
Hello, community
**Question**
There is a lot of duplication in the monitoring templates. For example, in the app-centos.yml file, different metrics only differ in the script and parseType, while other parameters like host, port, and username are repeated. This leads to longer YAML files.
<img width="330" alt="截屏2024-07-03 15 00 39" src="https://github.com/apache/hertzbeat/assets/61336903/a3f37ffc-1335-408c-b8e5-0a1484b4e9ab">
**Suggestion**
Consider extracting the repetitive parameters into a common protocolCommon section.
![Uploading 截屏2024-07-03 15.01.18.png…]()
GitHub link: https://github.com/apache/hertzbeat/discussions/2179
----
This is an automatically sent email for dev@hertzbeat.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hertzbeat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: dev-help@hertzbeat.apache.org
Re: [D] Simplify the monitor template [hertzbeat]
Posted by "tomsun28 (via GitHub)" <gi...@apache.org>.
GitHub user tomsun28 added a comment to the discussion: Simplify the monitor template
hi, thanks for suggestion. Protocol ssh http ... are already the common protocol abstract from protocols, there is no need to abstract a new common protocol from common protocol.
GitHub link: https://github.com/apache/hertzbeat/discussions/2179#discussioncomment-9953450
----
This is an automatically sent email for dev@hertzbeat.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hertzbeat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: dev-help@hertzbeat.apache.org
Re: [D] Simplify the monitor template [hertzbeat]
Posted by "tomorrowshipyltm (via GitHub)" <gi...@apache.org>.
GitHub user tomorrowshipyltm edited a discussion: Simplify the monitor template
Hello, community
**Background**
There is a lot of duplication in the monitoring templates. For example, in the app-centos.yml file, different metrics only differ in the script and parseType, while other parameters like host, port, and username are repeated. This leads to longer YAML files.
```
protocol: ssh
ssh:
host: ^_^host^_^
port: ^_^port^_^
username: ^_^username^_^
password: ^_^password^_^
privateKey: ^_^privateKey^_^
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
script: free -m
parseType: multiRow
```
**Suggestion**
Consider extracting the repetitive parameters into a common protocolCommon section, for example
```
protocolCommon: sshCommon
host:
port:
protocol: ssh
ssh:
script : uname
parseType: multiRow
```
GitHub link: https://github.com/apache/hertzbeat/discussions/2179
----
This is an automatically sent email for dev@hertzbeat.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hertzbeat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: dev-help@hertzbeat.apache.org
Re: [D] Simplify the monitor template [hertzbeat]
Posted by "tomorrowshipyltm (via GitHub)" <gi...@apache.org>.
GitHub user tomorrowshipyltm edited a discussion: Simplify the monitor template
Hello, community
**Question**
There is a lot of duplication in the monitoring templates. For example, in the app-centos.yml file, different metrics only differ in the script and parseType, while other parameters like host, port, and username are repeated. This leads to longer YAML files.
<img width="330" alt="截屏2024-07-03 15 00 39" src="https://github.com/apache/hertzbeat/assets/61336903/a3f37ffc-1335-408c-b8e5-0a1484b4e9ab">
**Suggestion**
Consider extracting the repetitive parameters into a common protocolCommon section.
```
protocolCommon: sshCommon
host:
port:
protocol: ssh
ssh:
script : uname
parseType: multiRow
```
GitHub link: https://github.com/apache/hertzbeat/discussions/2179
----
This is an automatically sent email for dev@hertzbeat.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hertzbeat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: dev-help@hertzbeat.apache.org
Re: [D] Simplify the monitor template [hertzbeat]
Posted by "tomsun28 (via GitHub)" <gi...@apache.org>.
GitHub user tomsun28 added a comment to the discussion: Simplify the monitor template
hi, under this commonParam design structure, what if the following metrics of the same one monitoring template use different collect protocols? If need modify a lot of work just to reduce the length of the yml template, sacrificing its readability and scalability, I personally think it is inappropriate
GitHub link: https://github.com/apache/hertzbeat/discussions/2179#discussioncomment-9963081
----
This is an automatically sent email for dev@hertzbeat.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hertzbeat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: dev-help@hertzbeat.apache.org
Re: [D] Simplify the monitor template [hertzbeat]
Posted by "tomorrowshipyltm (via GitHub)" <gi...@apache.org>.
GitHub user tomorrowshipyltm edited a discussion: Simplify the monitor template
Hello, community
**Background**
There is a lot of duplication in the monitoring templates. For example, in the app-centos.yml file, different metrics only differ in the script and parseType, while other parameters like host, port, and username are repeated. This leads to longer YAML files.
```
protocol: ssh
ssh:
host: ^_^host^_^
port: ^_^port^_^
username: ^_^username^_^
password: ^_^password^_^
privateKey: ^_^privateKey^_^
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
script: free -m
parseType: multiRow
```
**Suggestion**
Consider extracting the repetitive parameters into a commonParam section, for example
```
commonParam:
host: ^_^host^_^
port: ^_^port^_^
username: ^_^username^_^
password: ^_^password^_^
protocol: ssh
ssh:
script : uname
parseType: multiRow
```
GitHub link: https://github.com/apache/hertzbeat/discussions/2179
----
This is an automatically sent email for dev@hertzbeat.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hertzbeat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: dev-help@hertzbeat.apache.org
Re: [D] Simplify the monitor template [hertzbeat]
Posted by "tomorrowshipyltm (via GitHub)" <gi...@apache.org>.
GitHub user tomorrowshipyltm edited a discussion: Simplify the monitor template
Hello, community
**Question**
There is a lot of duplication in the monitoring templates. For example, in the app-centos.yml file, different metrics only differ in the script and parseType, while other parameters like host, port, and username are repeated. This leads to longer YAML files.
```
protocol: ssh
ssh:
host: ^_^host^_^
port: ^_^port^_^
username: ^_^username^_^
password: ^_^password^_^
privateKey: ^_^privateKey^_^
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
script: free -m
parseType: multiRow
```
**Suggestion**
Consider extracting the repetitive parameters into a common protocolCommon section, for example
```
protocolCommon: sshCommon
host:
port:
protocol: ssh
ssh:
script : uname
parseType: multiRow
```
GitHub link: https://github.com/apache/hertzbeat/discussions/2179
----
This is an automatically sent email for dev@hertzbeat.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hertzbeat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: dev-help@hertzbeat.apache.org
Re: [D] Simplify the monitor template [hertzbeat]
Posted by "tomorrowshipyltm (via GitHub)" <gi...@apache.org>.
GitHub user tomorrowshipyltm edited a discussion: Simplify the monitor template
Hello, community
**Question**
There is a lot of duplication in the monitoring templates. For example, in the app-centos.yml file, different metrics only differ in the script and parseType, while other parameters like host, port, and username are repeated. This leads to longer YAML files.
```
protocol: ssh
ssh:
host: ^_^host^_^
port: ^_^port^_^
username: ^_^username^_^
password: ^_^password^_^
privateKey: ^_^privateKey^_^
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
script: free -m
parseType: multiRow
```
**Suggestion**
Consider extracting the repetitive parameters into a common protocolCommon section, for example
```
protocolCommon: sshCommon
host:
port:
protocol: ssh
ssh:
script : uname
parseType: multiRow
```
GitHub link: https://github.com/apache/hertzbeat/discussions/2179
----
This is an automatically sent email for dev@hertzbeat.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hertzbeat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: dev-help@hertzbeat.apache.org
Re: [D] Simplify the monitor template [hertzbeat]
Posted by "tomorrowshipyltm (via GitHub)" <gi...@apache.org>.
GitHub user tomorrowshipyltm edited a discussion: Simplify the monitor template
Hello, community
**Question**
There is a lot of duplication in the monitoring templates. For example, in the app-centos.yml file, different metrics only differ in the script and parseType, while other parameters like host, port, and username are repeated. This leads to longer YAML files.
```
protocol: ssh
ssh:
host: ^_^host^_^
port: ^_^port^_^
username: ^_^username^_^
password: ^_^password^_^
privateKey: ^_^privateKey^_^
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
script: free -m
parseType: multiRow
```
**Suggestion**
Consider extracting the repetitive parameters into a common protocolCommon section, for example
```
protocolCommon: sshCommon
host:
port:
protocol: ssh
ssh:
script : uname
parseType: multiRow
```
GitHub link: https://github.com/apache/hertzbeat/discussions/2179
----
This is an automatically sent email for dev@hertzbeat.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hertzbeat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: dev-help@hertzbeat.apache.org
Re: [D] Simplify the monitor template [hertzbeat]
Posted by "tomorrowshipyltm (via GitHub)" <gi...@apache.org>.
GitHub user tomorrowshipyltm added a comment to the discussion: Simplify the monitor template
sorry, i'm confused, I mean commonParam rather than commonProtocol, so every metric can reference commonParam in one template.yml
GitHub link: https://github.com/apache/hertzbeat/discussions/2179#discussioncomment-9956349
----
This is an automatically sent email for dev@hertzbeat.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@hertzbeat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hertzbeat.apache.org
For additional commands, e-mail: dev-help@hertzbeat.apache.org