Cacti Timezone Support

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

grasland
Posts: 12
Joined: Wed Aug 08, 2007 2:35 pm

Post by grasland »

@ snupple: did you manage to get this working?
rklan
Posts: 15
Joined: Mon Dec 03, 2007 2:56 pm

Re: Cacti Timezone Support

Post by rklan »

Hello, I'm looking for the excact same thing.

I like to display my graphs holding the correct local time , viewed from all over the world.
Is this possible?

cactipete wrote:This is probably extreme, but...

We have a central cacti server that polls information from many machines at different time zones.

Without having multiple cacti servers (at each time zone), is it possible to create graphs that show times in relation to each time zone? i.e. A graph for a Boston machine may show 12:20 and one for a Los Angeles machine will show 9:20.

Ultimately, we're looking at our graphs to be timezone specific for the client machines.
stormonts
Cacti User
Posts: 349
Joined: Tue Mar 31, 2009 10:05 am

Post by stormonts »

What do I have to do to get this running on Cacti .8.7b?
zivley
Cacti User
Posts: 69
Joined: Tue Nov 13, 2007 6:22 am

Post by zivley »

We had to make decisions about this very problem and our decision was way simplier than that, regarding of every cacti server's geographical position, we've made them ALL work on UTC (GMT0) and a line was even added to the bottom of the pages that says it.
So no matter what graph are you looking at, and on what time zone you are, you'll know what time the graphs are showing just by translating it you your timezone, isn't that better than going mad trying to make it work?
Even if you succeed setting time zone for every single graph, at some point you'll get lost, not to talk if you need to compare graphs from two different timezones!
Think about it!
stormonts
Cacti User
Posts: 349
Joined: Tue Mar 31, 2009 10:05 am

Post by stormonts »

Our Cacti server is in EST and it monitors a number of servers in other timezones. Users at those remote locations then connect to our instance to view the graphs.

If a user at the Arizona location views one of the graphs, will the times on the graphs be in EST (where the RRAs and graphs are) or in the timezone where the user is viewing the graphs?
zivley
Cacti User
Posts: 69
Joined: Tue Nov 13, 2007 6:22 am

Post by zivley »

Cacti graphs timezones are as set in the server, so no matter where are you seeing the graphs from, the server will show them according to its own timezone settings, that's why I suggest you always set the cacti server's timezone to UTC, this way, every one will know what time things happened, I guess everybody knows what are their own timezones and can "translate GMT0 to whatever timezone they need.
User avatar
MrBr
Posts: 44
Joined: Thu Sep 24, 2009 10:13 am

Post by MrBr »

Any updates regarding this patch?
I need to use different time zones for each user. Unfortunately UTC is not an option.

I'm using 0.8.7e cacti
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I have to go back and look at the code again. It's been a while. Never quite finished it and plus I was using Windows, which does not support the insertion of a TZ environment variable within the users environment to change the behavior of RRDtool.

These days, I'm using Linux more often than not.

Larry
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
MrBr
Posts: 44
Joined: Thu Sep 24, 2009 10:13 am

Post by MrBr »

I'm using Cacti based on CenOS 5.3 linux.
I'll be happy to debug this feature if you need me to.

One question, after applying this patch, is there will be any problems upgrading Cacti to a newer version?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

That all depends. Right now, to do it properly, I would re-write it as a plugin.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
MrBr
Posts: 44
Joined: Thu Sep 24, 2009 10:13 am

Post by MrBr »

Thanks, waiting for plug-in :D
Are you planing to work on it in a near future?
Chrysalis
Cacti User
Posts: 70
Joined: Fri Sep 19, 2008 10:14 am
Location: UK

Post by Chrysalis »

I am also happy to test, using 0.8.7.e (i think) and OS FreeBSD 7.2
matzarah
Posts: 1
Joined: Wed May 19, 2010 2:42 am

Post by matzarah »

I've found a hack for changing the timezone which is working well so far. Keep in mind this changes the timezone for ALL hosts/devices.

I added the following lines to include/config.php

putenv("TZ=/usr/share/zoneinfo/Australia/Adelaide");
date_default_timezone_set('Australia/Adelaide');

First line changes the time zone in the env vars for when rrdtool is called by php. The 2nd sets the timezone in PHP.
thuck
Posts: 21
Joined: Mon Mar 09, 2009 6:13 pm

Plugin

Post by thuck »

Any news about this patch? Will we have a plugin for it?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Its all wraped into the next release and functional. Its a big change though.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests