diff --git a/sqle/api/controller/v1/instance_audit_plan.go b/sqle/api/controller/v1/instance_audit_plan.go index d539cb862..f91eb9d52 100644 --- a/sqle/api/controller/v1/instance_audit_plan.go +++ b/sqle/api/controller/v1/instance_audit_plan.go @@ -823,7 +823,6 @@ func GetAuditPlanExecCmd(projectName string, iap *model.InstanceAuditPlan, ap *m if !ok { return "" } - address := config.GetOptions().SqleOptions.DMSServerAddress parsedURL, err := url.Parse(address) if err != nil { @@ -838,6 +837,9 @@ func GetAuditPlanExecCmd(projectName string, iap *model.InstanceAuditPlan, ap *m var cmd string switch ap.Type { + case auditplan.TypeDefault: + cmdTpl := "--host=%s --port=%s --project=%s --audit_plan_id=%d --token=%s" + return fmt.Sprintf(cmdTpl, ip, port, iap.ProjectId, ap.ID, iap.Token) case auditplan.TypeAllAppExtract: cmd = fmt.Sprintf(`SQLE_PROJECT_NAME=%s \ PROJECT_APP_NAME= \ diff --git a/sqle/server/auditplan/meta.go b/sqle/server/auditplan/meta.go index f03c88c8c..587714c51 100644 --- a/sqle/server/auditplan/meta.go +++ b/sqle/server/auditplan/meta.go @@ -184,6 +184,7 @@ var supportedCmdTypeList = map[string]struct{}{ TypeMySQLSlowLog: {}, TypeTiDBAuditLog: {}, TypeAllAppExtract: {}, + TypeDefault: {}, } func GetSupportedScannerAuditPlanType() map[string]struct{} {