Bucket stats with zoom=minute returning only 43 readings

According to the documentation, zoom = minute will give me 60 samples for each second. However, I am getting only 43. Is this a bug. I am using Couchbase 6.6.2

  • zoom=minute - Every second for the last minute (60 samples).

Below is the output (kept only the timestamp)
http://localhost:8091/pools/default/buckets/liquidity/stats?zoom=minute

“timestamp”: [
1629238202603,
1629238203604,
1629238204604,
1629238205604,
1629238206606,
1629238207605,
1629238208604,
1629238209604,
1629238210603,
1629238211602,
1629238212604,
1629238213603,
1629238214604,
1629238215610,
1629238216605,
1629238217603,
1629238218605,
1629238219604,
1629238220605,
1629238221604,
1629238231605,
1629238232603,
1629238233606,
1629238234606,
1629238235605,
1629238236603,
1629238237603,
1629238238606,
1629238239603,
1629238240606,
1629238241605,
1629238242604,
1629238243603,
1629238244603,
1629238245605,
1629238246606,
1629238247605,
1629238248604,
1629238249604,
1629238250606,
1629238251604,
1629238261603,
1629238262603
],

Hi @rajib761

The stats REST API at the minute zoom will return at most about 60 samples from the most recent minute. If you look at your timestamps you can see they are 60 s apart:

“timestamp”: [ 1629238202603, ... 1629238262603 ]

Note the last 5 digits - from 02603 → 62603 – exactly 60 seconds apart. (The timestamps are unix timestamps in milliseconds.) You’re missing a bunch of timestamps here:
629238221604, 1629238231605,

and here:

1629238251604, 1629238261603,

In both cases you’ve lost 10 samples for some reason and these are spaced 30 seconds apart. So something is happening every 30 seconds for 10 consecutive samples not to be collected. Without full logs it’s hard to know what that might be, but you might want to look at the memcached logs for a clue. Separately, I understand you’re having an issue with the haveTStamp query parameter on the same REST API. I don’t notice it not working. Perhaps you could post how exactly it’s not working for you?

-dave

Hi Dave, my understanding is that havSTamp will give me the readings after the havSTamp time, however that is not happening. It is always giving me 1 minute past readings

Hi @rajib761:

On the 6.6.x code-line I see this:

$ curl -s 'host:8091/pools/default/buckets/default/stats?haveTStamp=1629257476813' -u Administrator:password | jq ".op.samples.timestamp"
[
1629301269211,
1629301270211,
1629301271212,
1629301272211,
1629301273211,
1629301274211,
1629301275212
]

So, essentially it’s working for me. It sounds like you’re not seeing this. If you’d like, you could create a JIRA ticket at issues.couchbase.com, post what you’re seeing and we can look into it for you.

Thanks,

-dave