Skip to content

Commit a1502b2

Browse files
committed
refactor: modify template.yaml
1 parent f530b5b commit a1502b2

File tree

4 files changed

+63
-27
lines changed

4 files changed

+63
-27
lines changed

agent/src/flow_generator/perf/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ impl FlowLog {
232232
self.last_fail = None;
233233
self.is_skip = false;
234234
}
235+
236+
if !self.is_success {
237+
self.l7_protocol_log_parser = None
238+
}
235239
}
236240
}
237241

server/agent_config/README-CH.md

+11-6
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,8 @@ global:
588588

589589
**详细描述**:
590590

591-
操作系统尽可能使用指定 ID 的 CPU 核运行 deepflow-agent 进程。无效的 ID 将被忽略。举例:
591+
操作系统尽可能使用指定 ID 的 CPU 核运行 deepflow-agent 进程。无效的 ID 将被忽略。当前仅对
592+
dispatcher 线程生效。举例:
592593
```yaml
593594
global:
594595
tunning:
@@ -6521,7 +6522,7 @@ Upgrade from old version: `static_config.l7-protocol-inference-max-fail-count`
65216522
processors:
65226523
request_log:
65236524
application_protocol_inference:
6524-
inference_max_retries: 5
6525+
inference_max_retries: 128
65256526
```
65266527

65276528
**模式**:
@@ -6532,10 +6533,14 @@ processors:
65326533

65336534
**详细描述**:
65346535

6535-
deepflow-agent 会周期性标记每一个 `<vpc, ip, protocol, port>` 四元组承载的应用协议类型,以加速
6536-
后续数据的应用协议采集过程。如果一个时间周期内,连续多次尝试解析 Packet 数据、Socket 数据无法推断
6537-
出该四元组承载的应用协议,agent 会将该四元组标记为 unknown 类型,并在本周期内暂停对后续数据的应用
6538-
协议解析,以避免更多的无效运算。该参数控制每个时间周期内的应用协议解析重试次数。
6536+
flow 应用协议的初始化判定会根据 IP、Port 等信息从哈希表中获取。若未能判定为具体应用协议时通过轮训
6537+
所有应用协议方式检查具体的应用协议,识别成功后通过哈希表记录该应用协议;若未识别成功累计记录失败次数,
6538+
若失败次数大于 inference_max_retries 并且记录未超时(inference_result_ttl),该 flow 会打上 skip 标记
6539+
并记录当前时间到 last_fail,后续该流在未超时前不会再进行应用协议解析。若已经判定为具体的应用协议时,
6540+
应用解析前会检查 flow 若有 skip 标记并且通过 last_fail 和 inference_result_ttl 计算已经超时会去掉 skip
6541+
标记。后续第一次应用协议解析成功后使用哈希表记录应用协议,若从未解析成功累计记录失败次数,若失败次数大于
6542+
inference_max_retries 并且记录未超时(inference_result_ttl),该 flow 会打上 skip 标记并记录当前时间到
6543+
last_fail,后续该流在未超时前不会再进行应用协议解析;若该 flow 已经解析成功过解析失败不记录失败次数。
65396544

65406545
#### 推断结果 TTL {#processors.request_log.application_protocol_inference.inference_result_ttl}
65416546

server/agent_config/README.md

+19-8
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,8 @@ global:
598598
**Description**:
599599

600600
CPU affinity is the tendency of a process to run on a given CPU for as long as possible
601-
without being migrated to other processors. Invalid ID will be ignored. Example:
601+
without being migrated to other processors. Invalid ID will be ignored. Currently only
602+
works for dispatcher threads. Example:
602603
```yaml
603604
global:
604605
tunning:
@@ -6681,7 +6682,7 @@ Upgrade from old version: `static_config.l7-protocol-inference-max-fail-count`
66816682
processors:
66826683
request_log:
66836684
application_protocol_inference:
6684-
inference_max_retries: 5
6685+
inference_max_retries: 128
66856686
```
66866687

66876688
**Schema**:
@@ -6692,12 +6693,22 @@ processors:
66926693

66936694
**Description**:
66946695

6695-
deepflow-agent will mark the long live stream and application protocol for each
6696-
<vpc, ip, protocol, port> tuple, when the traffic corresponding to a tuple fails
6697-
to be identified for many times (for multiple packets, Socket Data, Function Data),
6698-
the tuple will be marked as an unknown type to avoid deepflow-agent continuing to
6699-
try (incurring significant computational overhead) until the duration exceeds
6700-
l7-protocol-inference-ttl.
6696+
The initialization decision of the Flow app protocol is taken from the hash table based on information
6697+
such as IP, port, etc. If it cannot be determined that it is a specific application protocol, it will
6698+
pass the rotation training check the specific application protocol by all application protocol methods,
6699+
and record the application protocol through the hash table after the identification is successful. If
6700+
the number of successful record failures is not recognized, If the number of failures is greater than
6701+
inference_max_retries and the record does not time out (inference_result_ttl), the flow is marked with
6702+
a skip The current time is recorded to last_fail, and the subsequent flow will not be parsed by the
6703+
application protocol before the timeout. If it has been determined to be a specific application protocol,
6704+
The flow is checked before parsing and the skip is removed if it has a skip tag and has timed out through
6705+
last_fail and inference_result_ttl calculations Mark. After the first application protocol resolution is
6706+
successful, use a hash table to record the application protocol, and if the resolution is not successful,
6707+
the cumulative number of failures is recorded, and if the number of failures is greater than that
6708+
inference_max_retries and the record does not time out (inference_result_ttl), the flow is marked with a
6709+
skip mark and records that the current time has arrived last_fail, the subsequent flow will not be parsed
6710+
before the application protocol expires. If the flow has been parsed successfully, the number of failures
6711+
will not be recorded.
67016712

67026713
#### Inference Result TTL {#processors.request_log.application_protocol_inference.inference_result_ttl}
67036714

server/agent_config/template.yaml

+29-13
Original file line numberDiff line numberDiff line change
@@ -394,14 +394,16 @@ global:
394394
# description:
395395
# en: |-
396396
# CPU affinity is the tendency of a process to run on a given CPU for as long as possible
397-
# without being migrated to other processors. Invalid ID will be ignored. Example:
397+
# without being migrated to other processors. Invalid ID will be ignored. Currently only
398+
# works for dispatcher threads. Example:
398399
# ```yaml
399400
# global:
400401
# tunning:
401402
# cpu_affinity: [1, 3, 5, 7, 9]
402403
# ```
403404
# ch: |-
404-
# 操作系统尽可能使用指定 ID 的 CPU 核运行 deepflow-agent 进程。无效的 ID 将被忽略。举例:
405+
# 操作系统尽可能使用指定 ID 的 CPU 核运行 deepflow-agent 进程。无效的 ID 将被忽略。当前仅对
406+
# dispatcher 线程生效。举例:
405407
# ```yaml
406408
# global:
407409
# tunning:
@@ -4501,19 +4503,33 @@ processors:
45014503
# ee_feature: false
45024504
# description:
45034505
# en: |-
4504-
# deepflow-agent will mark the long live stream and application protocol for each
4505-
# <vpc, ip, protocol, port> tuple, when the traffic corresponding to a tuple fails
4506-
# to be identified for many times (for multiple packets, Socket Data, Function Data),
4507-
# the tuple will be marked as an unknown type to avoid deepflow-agent continuing to
4508-
# try (incurring significant computational overhead) until the duration exceeds
4509-
# l7-protocol-inference-ttl.
4506+
# The initialization decision of the Flow app protocol is taken from the hash table based on information
4507+
# such as IP, port, etc. If it cannot be determined that it is a specific application protocol, it will
4508+
# pass the rotation training check the specific application protocol by all application protocol methods,
4509+
# and record the application protocol through the hash table after the identification is successful. If
4510+
# the number of successful record failures is not recognized, If the number of failures is greater than
4511+
# inference_max_retries and the record does not time out (inference_result_ttl), the flow is marked with
4512+
# a skip The current time is recorded to last_fail, and the subsequent flow will not be parsed by the
4513+
# application protocol before the timeout. If it has been determined to be a specific application protocol,
4514+
# The flow is checked before parsing and the skip is removed if it has a skip tag and has timed out through
4515+
# last_fail and inference_result_ttl calculations Mark. After the first application protocol resolution is
4516+
# successful, use a hash table to record the application protocol, and if the resolution is not successful,
4517+
# the cumulative number of failures is recorded, and if the number of failures is greater than that
4518+
# inference_max_retries and the record does not time out (inference_result_ttl), the flow is marked with a
4519+
# skip mark and records that the current time has arrived last_fail, the subsequent flow will not be parsed
4520+
# before the application protocol expires. If the flow has been parsed successfully, the number of failures
4521+
# will not be recorded.
45104522
# ch: |-
4511-
# deepflow-agent 会周期性标记每一个 `<vpc, ip, protocol, port>` 四元组承载的应用协议类型,以加速
4512-
# 后续数据的应用协议采集过程。如果一个时间周期内,连续多次尝试解析 Packet 数据、Socket 数据无法推断
4513-
# 出该四元组承载的应用协议,agent 会将该四元组标记为 unknown 类型,并在本周期内暂停对后续数据的应用
4514-
# 协议解析,以避免更多的无效运算。该参数控制每个时间周期内的应用协议解析重试次数。
4523+
# flow 应用协议的初始化判定会根据 IP、Port 等信息从哈希表中获取。若未能判定为具体应用协议时通过轮训
4524+
# 所有应用协议方式检查具体的应用协议,识别成功后通过哈希表记录该应用协议;若未识别成功累计记录失败次数,
4525+
# 若失败次数大于 inference_max_retries 并且记录未超时(inference_result_ttl),该 flow 会打上 skip 标记
4526+
# 并记录当前时间到 last_fail,后续该流在未超时前不会再进行应用协议解析。若已经判定为具体的应用协议时,
4527+
# 应用解析前会检查 flow 若有 skip 标记并且通过 last_fail 和 inference_result_ttl 计算已经超时会去掉 skip
4528+
# 标记。后续第一次应用协议解析成功后使用哈希表记录应用协议,若从未解析成功累计记录失败次数,若失败次数大于
4529+
# inference_max_retries 并且记录未超时(inference_result_ttl),该 flow 会打上 skip 标记并记录当前时间到
4530+
# last_fail,后续该流在未超时前不会再进行应用协议解析;若该 flow 已经解析成功过解析失败不记录失败次数。
45154531
# upgrade_from: static_config.l7-protocol-inference-max-fail-count
4516-
inference_max_retries: 5
4532+
inference_max_retries: 128
45174533
# type: duration
45184534
# name:
45194535
# en: Inference Result TTL

0 commit comments

Comments
 (0)