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

使用GetMonitor 返回值为空 #183

Open
sandiandian opened this issue Jul 7, 2022 · 0 comments
Open

使用GetMonitor 返回值为空 #183

sandiandian opened this issue Jul 7, 2022 · 0 comments

Comments

@sandiandian
Copy link

go 1.18
GetMonitor无任何报错 但是返回值为空
iOutput, err := Instance.GetMonitor(
&qc.GetMonitorInput{
EndTime: qc.Time(time.Now()),
StartTime: qc.Time(time.Now().Add(-time.Hour * 24)),
Meters: []*string{
qc.String("cpu_utilization"),
qc.String("memory_utilization"),
qc.String("disk_utilization"),
},
Resource: qc.String("i-x x x x"),
Step: qc.String("2h"),
},
)
if err != nil {
logrus.Errorf("Get instance monitor failed, err:%v\n", err)
}
for _, meter := range iOutput.MeterSet {
fmt.Println(meter.Data...)
}
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant