cacti icon indicating copy to clipboard operation
cacti copied to clipboard

Add support to display Graphs of devices using the TimeZone of the location/site they are actually sitting in

Open thurban opened this issue 6 months ago • 7 comments

Feature Request

Add support to display Graphs of devices using the TimeZone of the location/site they are actually sitting in

An example would be to have the server and user sit in Europe/Berlin, looking at a device in America/Denver, so the graph is actually displaying the local time on the X-Axis.

Describe the solution you'd like

I see several options for doing this:

-> Graphs belonging to a single device ( host_id > 0 in graph_local ) and the device is configured to have a site Before calling the rrdtool command, the timezone of the site should be fetched and provided to the proc_open command as an environment variable :

$env = array('TZ' => 'America/Denver');
$process = proc_open(read_config_option('path_rrdtool') . ' - ' . $debug, $descriptorspec, $pipes,sys_get_temp_dir(),$env);

-> Graphs Templates provide an addition field for TimeZones , defaulting to a not-set value. The graphs can be configured to use a specific TimeZone for displaying the graph

It should be possible to disable/enable this feature. Either Globally/By User and/ or for each graph at the specific site.

Describe alternatives you've considered

n/a

Additional context

thurban avatar Jun 11 '25 09:06 thurban

We kind of had that roughed in at one point in time to display per the users time zone, but we can add the Devices. I think one specific customer was asking for that. Same with business logic.

TheWitness avatar Jun 15 '25 19:06 TheWitness

Are you going to take this one @thurban ?

TheWitness avatar Jun 15 '25 19:06 TheWitness

Yes, I can

thurban avatar Jun 16 '25 13:06 thurban

I'd want to review the implementation of that, have to be careful how it might affect others.

netniV avatar Jun 16 '25 17:06 netniV

Agreed.

TheWitness avatar Jun 17 '25 12:06 TheWitness

Any updates @thurban ?

TheWitness avatar Jul 11 '25 15:07 TheWitness

Yo @thurban! You working this one?

TheWitness avatar Nov 14 '25 16:11 TheWitness