Skip to content
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

feature: adds agent group config api #8065

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions server/agent_config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import _ "embed"
//go:embed example.yaml
var YamlAgentGroupConfig []byte

//go:embed template.yaml
var YamlAgentGroupConfigTemplate []byte

type AgentGroupConfig struct {
VTapGroupID *string `json:"VTAP_GROUP_ID" yaml:"vtap_group_id,omitempty"`
VTapGroupLcuuid *string `json:"VTAP_GROUP_LCUUID" yaml:"vtap_group_lcuuid,omitempty"`
Expand Down
15 changes: 15 additions & 0 deletions server/agent_config/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@

package agent_config

import "time"

type MySQLAgentGroupConfiguration struct {
ID int `gorm:"primaryKey;column:id;type:int;not null" json:"ID"`
Lcuuid string `gorm:"column:lcuuid;type:char(64);default:not null" json:"LCUUID"`
AgentGroupLcuuid string `gorm:"column:agent_group_lcuuid;type:char(64);default:not null" json:"AGENT_GROUP_LCUUID"`
Yaml string `gorm:"column:yaml;type:text;default:not null" json:"YAML"`
CreatedAt time.Time `gorm:"column:created_at;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"CREATED_AT"`
UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"UPDATED_AT"`
}

func (MySQLAgentGroupConfiguration) TableName() string {
return "agent_group_configuration"
}

type AgentGroupConfigModel struct {
ID int `gorm:"primaryKey;column:id;type:int;not null" json:"ID"`
MaxCollectPps *int `gorm:"column:max_collect_pps;type:int;default:null" json:"MAX_COLLECT_PPS"`
Expand Down
10 changes: 5 additions & 5 deletions server/agent_config/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2400,7 +2400,7 @@ inputs:
# ch: 乱序重排(OOOR)协议列表
# unit:
# range: []
# enum_options: [_DYNAMIC_OPTIONS_: _DYNAMIC_OPTIONS_]
# enum_options: [_DYNAMIC_OPTIONS_]
# modification: agent_restart
# ee_feature: true
# description:
Expand All @@ -2426,7 +2426,7 @@ inputs:
# ch: 分段重组(SR)协议列表
# unit:
# range: []
# enum_options: [_DYNAMIC_OPTIONS_: _DYNAMIC_OPTIONS_]
# enum_options: [_DYNAMIC_OPTIONS_]
# modification: agent_restart
# ee_feature: true
# description:
Expand Down Expand Up @@ -3078,7 +3078,7 @@ inputs:
# description:
# en: |-
# Used when deepflow-agent has only one k8s namespace query permission.
# en: |-
# ch: |-
# TODO
# upgrade_from: static_config.kubernetes-namespace
# TODO: 英文释义待明确。
Expand Down Expand Up @@ -3924,7 +3924,7 @@ processors:
# ch: 启用协议列表
# unit:
# range: []
# enum_options: [_DYNAMIC_OPTIONS_: _DYNAMIC_OPTIONS_]
# enum_options: [_DYNAMIC_OPTIONS_]
# modification: agent_restart
# ee_feature: false
# description:
Expand Down Expand Up @@ -4382,7 +4382,7 @@ processors:
# Used to extract the SpanID field in HTTP and RPC headers, supports filling
# in multiple values separated by commas. This feature can be turned off by
# setting it to empty.
# ch: |-
# ch: |-
# 配置该参数后,deepflow-agent 会尝试从 HTTP 和 RPC header 中匹配特征字段,并将匹配到
# 的结果填充到应用调用日志的`span_id`字段中,作为调用链追踪的特征值。参数支持填写多个不同的
# 特征字段,中间用`,`分隔。
Expand Down
Loading
Loading