Custom step values for metrics API calls

CheckMK Version: 2.2.0p32 Enterprise Edition

Hello,
I’ve been trying to set up a custom step value in the payload of a metric API call (/domain-types/metric/actions/get/invoke) which by default returns a very big value (6 hours) with considerable time ranges (~3 months)
I’d like to get hourly extractions by defining the step value that I receive in the response.

Is this possible to achieve? I know one solution would probably to do multiple extractions with smaller time frames, but I’d like to avoid that if possible.

What kind of downsampling are you using on your RRD files?
There are most likely no hour samples left.

1 Like

After about ~3 months it aggregates data in the span of 6 hours.
As an example, here is a graph from july 4th that’s still not aggregated:


If I try to obtain that data up to today, I get a 6 hours step:

I’m pretty sure the data is still there, I’m just getting a step too big

Edit: same extraction up to september 1st:

Your graph from july 4th show the correct 30 minute resolution.
What happens if you only try to fetch the data for this date?

I think you see this step here from the graph.


This has nothing to do with the real stored data.
If i change the zoom settings a little bit, i get a complete different step value.

Here it is more a question for the devs → is this working as intended or is this a bug?
@moritz or someone else :wink:

If I only fecth data for that day I get a step of 1800 (30 minutes):

I’m not sure if it’s a feature meant to get you less results with bigger timestamps, but it would be nice to manually set the step value when needed (if available)

Hi,
I have the same problem. I want to extract datapoints from the last month. The first six hours can be fetched in 1-minute steps. After that it gets compressed into 2-minute steps. I know we could generate a lot of network load when we fetch data in 1-minute steps from the last year. But it would still be nice if we could define if we want to compress the data or not.
Is there an option to do that?

Thanks
Remo

This is a different problem from the original one. In your case the RRD definition defines the data resolution.
The default settings are:
1 minute resolution for → 48 hours
5 minute resolution for → 10 days
30 minute resolution for → 90 days
6 hour resolution for → 4 years

Have a look at the rules “Configuration of RRD databases of services/hosts” or if you use the RAW edition, the definition can be done inside the config files under ~/etc/pnp4nagios/.

In the post here the problem is that the metrics API only gives the datapoints back that are also shown inside the graph not all, also if there are more available.

Then I misunderstood the original question, sorry for that. I’ve opened a separate topic here.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.