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

agent上传数据时间偏移,导致误告警 #66

Open
missuzhang opened this issue Sep 2, 2016 · 0 comments
Open

agent上传数据时间偏移,导致误告警 #66

missuzhang opened this issue Sep 2, 2016 · 0 comments

Comments

@missuzhang
Copy link
Contributor

missuzhang commented Sep 2, 2016

agent采集数据的周期是在一个for循环中控制的。如果采集数据的时间可以忽略不计不会有问题,但是实际上采集数据还是要花费时间的,这就导致上报的数据时间是漂移的。至今发现过一些误告警的情况,开始上报数据的时间是每分钟的59秒,然后漂移到60秒,transfer接收到数据进行取余操作,就会有一个数据点的丢失,例如:
agent transfer
1:59 1:00
2:59 2:00
4:00 4:00
时间戳采用采集数据开始前的时间(now := time.Now().Unix()移到for开始的时候)而不是采集完毕后的时间比较和里。

@missuzhang missuzhang reopened this Sep 2, 2016
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