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

【求助】按天为单位,上报数据如何正确上报和展现? #271

Closed
CastroKKK opened this issue Oct 11, 2017 · 5 comments
Closed

Comments

@CastroKKK
Copy link

背景:
本人自己写了标准push脚本,在当天的任意24小时之内的一个时间(比如我现在的这个2017年10月11日 10:07:46)我执行了一次push脚本上报数据,step=86400(这是我的理解按天push)。。。。。然后出现了下面2个问题。求指导!

1、我脚本执行push完之后,在dashboard可以正确查看到数据,但是过了1个小时之后再查就没有数据了。endpoint和Counters都在,但是刚刚push完查看的数据点没数据了,全是NaN了(无论我选择哪个时间周期都不显示了)

2、我1天仅push一次的脚本数据点展现时间并不是我push的时间,而是8:00 ,请问这是为何?

前辈们,我的这种push方法和step配置针对按天上报的数据是否有问题?跪求指导!!!

@laiwei
Copy link
Member

laiwei commented Oct 13, 2017

  1. 每天push一次数据,那么step要设置为86400,并且坚持每天push一次数据哈;
  2. push上去后,服务端会对时间戳做归一化,即服务端记录的时间戳 = int(当前时间戳/86400)

@CastroKKK

@CastroKKK
Copy link
Author

已成功每日push,感谢玮哥

@ttwwaaoo
Copy link

ttwwaaoo commented Dec 28, 2017

@laiwei @CastroKKK 你好 我想问下这个问题怎么解决的 我现在传上去的数据也是1小时后就丢了,两位谁能帮我看一下,我的现在是每天一报数据,但是今天的报上去,前一天的数据就会丢失

@CastroKKK
Copy link
Author

@ttwwaaoo 你遇到的问题和我一致。解决办法:你写好的脚本每天执行即可(切记step=86400),前两天不用管,三天以后数据就开始正常了。
数据丢失这个问题laiwei解释的很到位“服务端会对时间戳做归一化”!!!

@ttwwaaoo
Copy link

ttwwaaoo commented Jan 2, 2018

@CastroKKK 好的 谢谢啦,那这样子 是不能像其他的指标 按照时间顺序补进去历史数据的 对吧?

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

3 participants