-
Notifications
You must be signed in to change notification settings - Fork 19
更新 deepfliw-ctl 使用方式与 docker 部署时存在问题 #708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
1473371932
wants to merge
2
commits into
deepflowio:main
Choose a base branch
from
1473371932:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,9 @@ permalink: /best-practice/agent-advanced-config/ | |
|
||
# 简介 | ||
|
||
DeepFlow Agent 高级配置。 | ||
DeepFlow 通过声明式 API 对所有 agent 进行统一管控,而 agent 的数据采集配置由 deepflow-server 根据 agent-group-config 内容统一下发至对应 agent-group 内的 agent。 | ||
|
||
DeepFlow 使用声明式 API 对所有 deepflow-agent 进行控制,几乎所有的 deepflow-agent 配置均通过 deepflow-server 下发。在 DeepFlow 中,agent-group 为管理一组 deepflow-agent 配置的组。我们可以在 deepflow-agent 本地配置文件(K8s ConfigMap、Host 上的 deepflow-agent.yaml)中指定 `vtap-group-id-request` 来声明希望加入的组,也可直接在 deepflow-server 上配置每个 deepflow-agent 的所属组(且后者优先级更高)。agent-group-config 和 agent-group 一一对应,通过 agent-group ID 关联。 | ||
agent-group 用于管理一组 agent 的配置,通过在 agent [配置文件](https://github.com/deepflowio/deepflow/blob/main/agent/config/deepflow-agent.yaml)(K8s ConfigMap 或 `/etc/deepflow-agent.yaml`)中指定 `vtap-group-id-request` 来声明归属的 agent-group(未指定时默认使用 [Default](https://github.com/deepflowio/deepflow/blob/main/server/agent_config/template.yaml) 配置),最终通过 agent-group ID 实现 agent、agent-group、agent-group-config 三者的关联。 | ||
|
||
## agent-group 常用操作 | ||
|
||
|
@@ -23,25 +23,27 @@ deepflow-ctl agent-group list | |
deepflow-ctl agent-group create your-agent-group | ||
``` | ||
|
||
获取刚刚创建的 agent-group ID: | ||
获取创建的 agent-group ID: | ||
|
||
```bash | ||
deepflow-ctl agent-group list your-agent-group | ||
``` | ||
|
||
## agent-group-config 常用操作 | ||
|
||
参考上述 agent 默认配置,摘取其中你想修改的部分,创建一个 `your-agent-group-config.yaml` 文件并填写 agent 配置参数,注意必须包含 `vtap_group_id`: | ||
参考上述 agent-group-config [默认配置](https://github.com/deepflowio/deepflow/blob/main/server/agent_config/template.yaml),摘取其中需要修改的部分输出至 `your-agent-group-config.yaml` 文件,例如: | ||
|
||
```yaml | ||
vtap_group_id: <Your-agent-group-ID> | ||
# write configurations here | ||
global: | ||
limits: | ||
max_millicpus: 1000 | ||
max_memory: 768 | ||
``` | ||
|
||
### 创建 agent-group-config | ||
|
||
```bash | ||
deepflow-ctl agent-group-config create -f your-agent-group-config.yaml | ||
deepflow-ctl agent-group-config create <agent-group ID> -f your-agent-group-config.yaml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agent-group-id 吧,在命令行中这样连着写更紧凑 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 命令行中用小写也更合适 |
||
``` | ||
|
||
### 获取 agent-group-config 列表 | ||
|
@@ -53,24 +55,15 @@ deepflow-ctl agent-group-config list | |
### 获取 agent-group-config 配置 | ||
|
||
```bash | ||
deepflow-ctl agent-group-config list <Your-agent-group-ID> -o yaml | ||
``` | ||
|
||
### 获取 agent-group-config 所有配置及其默认值 | ||
|
||
```bash | ||
deepflow-ctl agent-group-config example | ||
deepflow-ctl agent-group-config list <agent-group ID> -o yaml | ||
``` | ||
|
||
### 更新 agent-group-config 配置 | ||
|
||
```bash | ||
deepflow-ctl agent-group-config update -f your-agent-group-config.yaml | ||
deepflow-ctl agent-group-config update <agent-group ID> -f your-agent-group-config.yaml | ||
``` | ||
|
||
## 常用配置项 | ||
## 各配置项说明 | ||
|
||
- `max_memory`: agent 最大内存限制,默认值为 `768`,单位为 MB。 | ||
- `thread_threshold`: agent 最大线程数量,默认值为 `500`。 | ||
- `tap_interface_regex`: agent 采集网卡正则配置,默认值为 `^(tap.*|cali.*|veth.*|eth.*|en[ospx].*|lxc.*|lo)$`,agent 只需要采集 Pod 网卡和 Node/Host 物理网卡即可。 | ||
- `platform_enabled`: agent 上报资源时使用, 用于 `agent-sync` 的 domain,一个 DeepFlow 平台只能有一个`agent-sync` 的 domain。 | ||
具体可参考[配置手册](../configuration/agent/),各参数均有详细说明与使用示例 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
引用文档更好?
../configuration/agent/