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

feat: 自定义指标上报配置文件订阅默认开启巡检 --story=120578409 #3764

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ def create_or_update_config(cls, subscription_params, bk_biz_id, plugin_name="bk
try:
logger.info("subscription task already exists.")
sub_config_obj = qs.first()
# 更新订阅巡检开启
api.node_man.switch_subscription(subscription_id=sub_config_obj.subscription_id, action="enable")
subscription_params["subscription_id"] = sub_config_obj.subscription_id
subscription_params["run_immediately"] = True

Expand Down Expand Up @@ -429,7 +431,8 @@ def create_or_update_config(cls, subscription_params, bk_biz_id, plugin_name="bk
subscription_id=subscription_id,
bk_data_id=bk_data_id,
)

# 创建的订阅默认开启巡检
api.node_man.switch_subscription(subscription_id=subscription_id, action="enable")
result = api.node_man.run_subscription(
subscription_id=subscription_id, actions={plugin_name: "INSTALL"}
)
Expand Down