Hi everyone! I’ve been testing the CheckMK API’s Get Metric query across different time ranges and noticed some interesting behavior patterns in how the end timestamp is handled.
When querying metrics, the API seems to switch between exclusive [start,end) and inclusive [start,end] ranges depending on the time period:
For periods up to 3 weeks, it’s exclusive [start,end):
- 1 week: 336 samples (step=1800s)
- 2 weeks: 336 samples (step=3600s)
- 3 weeks: 336 samples (step=5400s)
But for longer periods, it becomes inclusive [start,end]:
- 4 weeks: 337 samples (step=7200s)
- 1 month (more than 4 weeks): 373 samples (step=7200s)
- 1 old month (e.g., Aug 1 to Sep 1): 125 samples (step=21600s)
Is this expected behaviour? I couldn’t find documentation about it.
Looking forward to your insights!
Thank you very much!