Change Graphs from 48 hours to 4 hours

2.0.0p29 (RAW Edition)
Ubuntu 20.04.02

Hello CheckMK community,

I have graphs enabled to output on the email alert of the service and have to say it looks great! (kudos to the team for making a sleek interface/format from 1.6.x to 2.0.x)

A question came up for one of the departments i’m providing monitoring for regarding the graphs that display currently in what appears to be a 48 hour format. (see pic below)

Is there any way to modify the time value of the graph being displayed to break down this better (I would say maybe a 4 hour timeframe) so that the end user could see in minutes when the outages occur?

Any help as always is greatly appreciated!

Don’t you have these in RAW (should be there)?:


If you ask for dashboards: if you want to add service metrics to a dashboard there should be the option to choose the time period.
Also you might want to have a look here: Performance data and graphing - Evaluating measured values in Checkmk quickly and easily

BR
Thomas

For the notifications graphs there is only 25 hours time frame used if not modified.
Your example only shows 25 hours :wink:

If you want to change this, you need to modify the function that generates the graphs inside CMK.
→ ~/lib/check_mk/gui/plugins/metrics/graph_images.py
function name → _answer_graph_image_request

Thank you Andreas as always for the helpful direction, I was looking for that function name and couldn’t find where that function lives within the graph_images.py file.

I do see this:
image

Wondering if I change the 25 in this line to 4 if that would change the graph to the desired 4 hour output.

Line Reference:

Original config
start_time = end_time - (25 * 3600)

New config
start_time = end_time - (4 * 3600)

Also, what does the 3600 do to the graph’s display? Is that for seconds/interval?

I think what I’m leaning towards is:

Is it possible to have a graph that’s 20-30 minutes to show a 1 minutes interval?

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.