Closed ljurk closed 1 week ago
Hi @ljurk Did you tried e.g. '100s' with data above? Digits means 'number of points', so, 10 means 10 points, so, with 10 sec resolution it should be equivalent of '100s'. '10sec' exactly match resolution, not sure it movingWindow will work in this case.
I tried it, but the result was the same, an empty array. By accident i tried 0s
and got a response, even though it doesnt contain datapoints:
[
{
"target": "movingWindow(collectd.ceph.server.ceph_smb1.cpu.percent-idle,'0s')",
"datapoints": [
[
null,
1724151190
],
[
null,
1724151200
],
[
null,
1724151210
],
[
null,
1724151220
],
[
null,
1724151230
],
[
null,
1724151240
]
],
"tags": {
"movingWindow": "'0s'",
"name": "collectd.ceph.server.ceph_smb1.cpu.percent-idle"
}
}
]
CarbonAPI Version 1.1.0
Latest version that was tagged is 0.16.1. So I have hard time pinpointing the correct one. ALso that was almost a year ago, so I would encourage to try latest master anyway.
sorry, this returened by /version
. Im using the latest master
sorry, this was returned by /version
That endpoint returns what Grafana would parses for graphite endpoint, and not carbonapi version.
Can you share the raw request (same request, without movingWindow)?
curl "localhost/render/?target=collectd.ceph.server.ceph_smb1.cpu.percent-idle&format=json&from=-1min"
[
{
"target": "collectd.ceph.server.ceph_smb1.cpu.percent-idle",
"datapoints": [
[
99.2985971943888,
1724151640
],
[
99.6498249124562,
1724151650
],
[
98.8476953907816,
1724151660
],
[
99.1995997999,
1724151670
],
[
99.8997995991984,
1724151680
],
[
98.1509245377311,
1724151690
]
],
"tags": {
"name": "collectd.ceph.server.ceph_smb1.cpu.percent-idle"
}
}
]
I forgot to mention, that we have 2 replicated instances: 1 go-carbon/carbonapi and 1 carbon/graphite. Both instances have the same data, the movingWindow-query works in the carbon/graphite instance.
Describe the bug The movingWindow function is not returning data if i use time as an argument(e.g.
1sec
,1min
,1hour
). If I use the count, its working.CarbonAPI Version 1.1.0
Logs curl request:
grafana request
CarbonAPI Configuration:
Simplified query (if applicable)
movingWindow(collectd.ceph.server.ceph_smb1.cpu.percent-idle,'10sec')
Backend response (if possible)
response for time
movingWindow(collectd.ceph.server.ceph_smb1.cpu.percent-idle, '10sec')
response for count
movingWindow(collectd.ceph.server.ceph_smb1.cpu.percent-idle, 10)
other
moving*
functions seem to function with time, but notmovingWindow
. I've also saw and ran the tests for the movingWindow-function, the tests are working. I've no idea why