Documentation ¶
Overview ¶
Package logrule log rule
Index ¶
- func CreateLogRule(c *rest.Context) (interface{}, error)
- func DeleteLogRule(c *rest.Context) (interface{}, error)
- func DisableLogRule(c *rest.Context) (interface{}, error)
- func EnableLogRule(c *rest.Context) (interface{}, error)
- func GetEntrypoints(c *rest.Context) (interface{}, error)
- func GetLogRule(c *rest.Context) (interface{}, error)
- func GetSpaceID(projectCode string) string
- func GetStorageClusters(c *rest.Context) (interface{}, error)
- func ListLogCollectors(c *rest.Context) (interface{}, error)
- func RetryLogRule(c *rest.Context) (interface{}, error)
- func SwitchStorage(c *rest.Context) (interface{}, error)
- func UpdateLogRule(c *rest.Context) (interface{}, error)
- type CreateLogRuleReq
- type Entrypoint
- type GetEntrypointsReq
- type GetLogRuleResp
- type GetLogRuleRespSortByName
- type GetLogRuleRespSortByStatus
- type GetLogRuleRespSortByUpdateTime
- type SwitchStorageReq
- type UpdateLogRuleReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLogRule ¶
CreateLogRule 创建日志采集规则 @Summary 创建日志采集规则 @Tags LogCollectors @Produce json @Success 200 @Router /log_collector/rules [post]
func DeleteLogRule ¶
DeleteLogRule 删除日志采集规则 @Summary 删除日志采集规则 @Tags LogCollectors @Produce json @Success 200 @Router /log_collector/rules/:id [delete]
func DisableLogRule ¶
DisableLogRule 停用日志采集规则 @Summary 停用日志采集规则 @Tags LogCollectors @Produce json @Success 200 @Router /log_collector/rules/:id/disable [post]
func EnableLogRule ¶
EnableLogRule 启用日志采集规则 @Summary 启用日志采集规则 @Tags LogCollectors @Produce json @Success 200 @Router /log_collector/rules/:id/enable [post]
func GetEntrypoints ¶
GetEntrypoints 获取容器日志查询入口 @Summary 获取容器日志查询入口 @Tags LogCollectors @Produce json @Success 200 {object} map[string]Entrypoint @Router /log_collector/entrypoints [post]
func GetLogRule ¶
GetLogRule 获取日志采集规则详情 @Summary 获取日志采集规则详情 @Tags LogCollectors @Produce json @Success 200 object GetLogRuleResp @Router /log_collector/rules/:id [get]
func GetStorageClusters ¶
GetStorageClusters 获取 ES 存储集群 @Summary 获取 ES 存储集群 @Tags LogCollectors @Produce json @Success 200 @Router /log_collector/storages/cluster_groups [get]
func ListLogCollectors ¶
ListLogCollectors 获取日志采集规则列表 @Summary 获取日志采集规则列表 @Tags LogCollectors @Produce json @Success 200 {array} GetLogRuleResp @Router /log_collector/rules [get]
func RetryLogRule ¶
RetryLogRule 重试日志采集规则 @Summary 重试日志采集规则 @Tags LogCollectors @Produce json @Success 200 @Router /log_collector/rules/:id/retry [post]
func SwitchStorage ¶
SwitchStorage 切换 ES 存储集群 @Summary 切换 ES 存储集群 @Tags LogCollectors @Produce json @Success 200 @Router /log_collector/storages/switch_storage [post]
func UpdateLogRule ¶
UpdateLogRule 更新日志采集规则 @Summary 更新日志采集规则 @Tags LogCollectors @Produce json @Success 200 @Router /log_collector/rules/:id [put]
Types ¶
type CreateLogRuleReq ¶
type CreateLogRuleReq struct { DisplayName string `json:"display_name" form:"display_name"` Name string `json:"name" form:"name" binding:"required" validate:"max=30,min=5,regexp=^[A-Za-z0-9_]+$"` RuleName string `json:"-" form:"-"` Description string `json:"description"` Rule bklog.LogRule `json:"rule"` FromRule string `json:"from_rule"` }
CreateLogRuleReq req
type Entrypoint ¶
type Entrypoint struct { STDLogURL string `json:"std_log_url"` FileLogURL string `json:"file_log_url"` STDBKBaseURL string `json:"std_bk_base_url"` // 跳转到数据平台地址 FileBKBaseURL string `json:"file_bk_base_url"` // 跳转到数据平台地址 }
Entrypoint entrypoint
type GetEntrypointsReq ¶
type GetEntrypointsReq struct {
ContainerIDs []string `json:"container_ids" form:"container_ids"`
}
GetEntrypointsReq params
type GetLogRuleResp ¶
type GetLogRuleResp struct { ID string `json:"id"` DisplayName string `json:"display_name"` Name string `json:"name"` RuleID int `json:"rule_id"` RuleName string `json:"rule_name"` Description string `json:"description"` FileIndexSetID int `json:"file_index_set_id"` STDIndexSetID int `json:"std_index_set_id"` RuleFileIndexSetID int `json:"rule_file_index_set_id"` RuleSTDIndexSetID int `json:"rule_std_index_set_id"` Config bklog.LogRule `json:"rule"` CreatedAt utils.JSONTime `json:"created_at"` UpdatedAt utils.JSONTime `json:"updated_at"` Creator string `json:"creator"` Updator string `json:"updator"` Old bool `json:"old"` NewRuleID string `json:"new_rule_id"` // 当旧规则转换过新规则后,显示该字段 Entrypoint Entrypoint `json:"entrypoint"` Status string `json:"status"` Message string `json:"message"` }
GetLogRuleResp log rule resp
type GetLogRuleRespSortByName ¶
type GetLogRuleRespSortByName []*GetLogRuleResp
GetLogRuleRespSortByName sort LogRule by name
func (GetLogRuleRespSortByName) Less ¶
func (l GetLogRuleRespSortByName) Less(i, j int) bool
Less xxx
type GetLogRuleRespSortByStatus ¶
type GetLogRuleRespSortByStatus []*GetLogRuleResp
GetLogRuleRespSortByStatus sort LogRule by status
func (GetLogRuleRespSortByStatus) Less ¶
func (l GetLogRuleRespSortByStatus) Less(i, j int) bool
Less xxx
func (GetLogRuleRespSortByStatus) Swap ¶
func (l GetLogRuleRespSortByStatus) Swap(i, j int)
Swap xxx
type GetLogRuleRespSortByUpdateTime ¶
type GetLogRuleRespSortByUpdateTime []*GetLogRuleResp
GetLogRuleRespSortByUpdateTime sort LogRule by update time
func (GetLogRuleRespSortByUpdateTime) Len ¶
func (l GetLogRuleRespSortByUpdateTime) Len() int
Len xxx
func (GetLogRuleRespSortByUpdateTime) Less ¶
func (l GetLogRuleRespSortByUpdateTime) Less(i, j int) bool
Less xxx
func (GetLogRuleRespSortByUpdateTime) Swap ¶
func (l GetLogRuleRespSortByUpdateTime) Swap(i, j int)
Swap xxx
type SwitchStorageReq ¶
type SwitchStorageReq struct {
StorageClusterID int `json:"storage_cluster_id"`
}
SwitchStorageReq 切换 ES 存储集群请求