Cacti Timezone Support
Moderators: Developers, Moderators
Re: Cacti Timezone Support
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?
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.
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!
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!
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?
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?
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.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
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
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?
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?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
That all depends. Right now, to do it properly, I would re-write it as a plugin.
TheWitness
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?
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?
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.
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.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Its all wraped into the next release and functional. Its a big change though.
TheWitness
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?
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?
Who is online
Users browsing this forum: No registered users and 3 guests