graphite-dev team mailing list archive
-
graphite-dev team
-
Mailing list archive
-
Message #03681
[Question #218706]: Aggregation method and empty data returned by URL API
New question #218706 on Graphite:
https://answers.launchpad.net/graphite/+question/218706
Hello,
I have about hundred metrics sent once per second to Graphite. All my metrics are actually the values of parameters measured by different measuring systems in real time. Only one instance of carbon-cache.py is running. The retention scheme is the same for all metrics:
[dasop]
pattern = ^dasop\.
retentions = 1s:3y, 10s:7y
I have no problem with retrieving data with URL request like this to get data from the time already passed:
http://my.graphite.example/render?target=dasop.some.metric&from=10:30_20130109&until=10:31_20130109&format=json
But, if I use the following request to monitor the current value of the metric, which is very interesting for my applications:
http://my.graphite.example/render?from=-20sec&until=now&target=dasop.some.metric&format=json
I got all nulls in the response:
[{"target": "dasop.some.metric", "datapoints": [[null, 1357713815], [null, 1357713816], [null, 1357713817], ...
And only if I increase "from" value to -40sec or more I have some (or all for greater "from" values) not null values in a response. But in this case I see a significant (several seconds) time delay between data received and real metric behavior.
My guess is that I do not fully understand how the data aggregation works. I do not use customized storage-aggregation.conf configuration file. So, the default aggregation method is "average". Could be this the source of my problem? How many values are used for averaging? May be the aggregation method = "last" is more suitable for my applications. I can't check it right now, because my metrics are generated not every day, so I need in theoretical answer in advance :)
Thanks,
Alexandr
--
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.