热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Summarizefunctionisdoingalignmentwithouttimezone?

Hi.Imtryingtogetsummarizefrom00:00otfirstdayofthismonthametric,

Hi .

I'm trying to get summarize from 00:00 ot first day of this month a metric, I'm working on spain and I've configured my timezone in /opt/graphite/webapp/graphite/local_settings.py

1
2
# needs to be explicitly set to your local timezone.

TIME_ZONE = 'Europe/Madrid'

I did this query.

1
http://graphite/render?format=json&from=4/01/2015&until=-&target=summarize(my.system.cpu.percent-active,'1day','avg')

And I got that

[{"target": "summarize(my.system.cpu.percent-active, \"1day\", \"avg\")", "datapoints": [[49.497208009728958, 1427846400], [37.077833077777775, 1427932800], [42.021989086805604, 1428019200], [49.25920844236115, 1428105600], [63.997593792361165, 1428192000], [81.546292237499998, 1428278400], [73.984663305555543, 1428364800], [73.646580338888811, 1428451200], [48.208400477083359, 1428537600], [38.049111687500016, 1428624000], [32.406861394444419, 1428710400], [32.73222370000007, 1428796800], [34.046655264583308, 1428883200], [34.440842520138879, 1428969600], [60.00367210694445, 1429056000], [87.657549924305584, 1429142400], [75.007352623225813, 1429228800]]}]

If I do tranlation for this timestamps to my current location summarize function seems to align to Standard Time +0000 UTC , and not my local Timezone as I would want

image

image

该提问来源于开源项目:graphite-project/graphite-web

According to documentation "The alignToFrom boolean parameter has been replaced by alignTo and no longer has any effect. Alignment can be to years, months, weeks, days, hours, and minutes."
So, smartSummarize(seriesList, intervalString, func='sum', alignTo='day') should work fine with timezones.


推荐阅读
author-avatar
BBCong
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有