Skip to content

Commit

Permalink
Merge pull request #17895 from ioito/hotfix/qx-cloudmon-system-metric
Browse files Browse the repository at this point in the history
fix(cloudmon): skip part of service system metric collect
  • Loading branch information
zexi committed Aug 31, 2023
2 parents 9a3e2e3 + 683a510 commit e785dc1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions pkg/apis/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,33 @@ var (
SERVICE_TYPE_KEYSTONE,
SERVICE_TYPE_ETCD,
SERVICE_TYPE_INFLUXDB,
SERVICE_TYPE_CLOUDMON,
SERVICE_TYPE_METER,
SERVICE_TYPE_CLOUDEVENT,
SERVICE_TYPE_ANSIBLE,
SERVICE_TYPE_INFLUXDB,
SERVICE_TYPE_APIMAP,
SERVICE_TYPE_LOG,
"autoupdate",
"yunionagent",
"webconsole",
"esxiagent",
"s3gateway",
"common",
"websocket",
"echarts-ssr",
"lbagent",
"vpcagent",
"cloudwatcher",
"cloudnet",
"repo",
"cloudproxy",
"apigateway",
"yunionapi",
"billing",
"etcd",
"itsm",
"ntp",
}
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/cloudmon/misc/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func CollectServiceMetrics(ctx context.Context, userCred mcclient.TokenCredentia
}
metrics := []influxdb.SMetricData{}
for _, ep := range endpoints {
if utils.IsInStringArray(ep.ServiceType, apis.NO_RESOURCE_SERVICES) {
if utils.IsInStringArray(ep.ServiceType, apis.NO_RESOURCE_SERVICES) || ep.ServiceType == apis.SERVICE_TYPE_IMAGE {
continue
}
url := httputils.JoinPath(ep.Url, "version")
Expand Down

0 comments on commit e785dc1

Please sign in to comment.