[Question] Is the logic of PING connectivity reasonable?
- Dominant language
- Java
- Stars
- 7.4k
- Forks
- 1.3k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 32
Description
### Question
### 当前逻辑
ping 连通时返回ping耗时,未连通、异常时没有返回ping耗时。[相关代码](https://github.com/dromara/hertzbeat/blob/master/collector/src/main/java/com/usthe/collector/collect/icmp/IcmpCollectImpl.java)
### 问题
ping告警只能根据ping耗时触发,ping采集失败和异常情况没有ping 耗时。不能触发告警,而发现ping异常、超时正是ping检测的目的。是比ping耗时变长更严重的问题
### 建议
#### 方案一
ping采集发生异常、超时将ping耗时赋值为Long最大值,表示无穷大,可触发告警
#### 方案二
将采集失败、超时等异常情况添加到PING连通性的告警表达式配置中,可配置发生异常时告警
Contributor guide
Research direction
Start by reading collector/src/main/java/com/usthe/collector/collect/icmp/IcmpCollectImpl.java and trace how successful, failed, and timed-out PING results reach alert expressions. Compare the two proposed approaches and confirm that the chosen behavior lets failed or timed-out checks trigger alerts without losing normal ping-latency alerts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- networking, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100