Skip to content

Commit

Permalink
使用tag抓取mysql机器数据,不再依赖实例名
Browse files Browse the repository at this point in the history
  • Loading branch information
haokang.ke committed Aug 14, 2018
1 parent f095fb0 commit ec58592
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion exporter/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ func DiscoveryAlicloudMysql(filePath, exporterType string) {
request := ecs.CreateDescribeInstancesRequest()
request.PageSize = requests.NewInteger(PAGESIZE)
request.PageNumber = requests.NewInteger(i + 1)
request.InstanceName = "mysql*"
request.Tag1Key = "Monitoring"
request.Tag1Value = "true"
request.Tag2Key = "Component"
request.Tag2Value = "mysql"
request.Status = "Running"
response, err := ecsClient.DescribeInstances(request)
if err != nil {
Expand Down

0 comments on commit ec58592

Please sign in to comment.