Help with rrd.php/ out of sync data

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Moderators, Developers

Post Reply
Author
Message
turdferguson
Posts: 3
Joined: Tue Feb 14, 2012 10:52 am

Help with rrd.php/ out of sync data

#1 Post by turdferguson » Tue Feb 14, 2012 11:12 am

Hello,

I recently upgraded to 0.8.7i and ended up with my graph data out of sync. Here are the details:

my date command shows the correct date time and timezone

Code: Select all

php -r "echo date (DATE_RFC822);"
shows the correct date, time and timezone

The show tech page on Cacti shows the correct date, time and timezone

The graphs in cacti are labeled with the correct date, time and timezone

The data in cacti is graphing 6 hours in the past

If I dump the rrd to xml I see that the last update field shows seconds since the epoch, but instead of being 6 hours ahead of my localtimezone, it is current to my local timezone. (As if CST was GMT)

The comment next to the last update field shows a date that is 6 hours in the past relative to my local time.

I set up a test rrd file and test cron job to update it every 5 min with time set to 'N'. The dump from the test rrd file shows the correct GMT Unix time stamp in the last update field and a comment beside that shows the correct local time.

I also set the correct timezone in both php.ini files (cli and apache2) and restart apache2

So it would appear that Cacti is not using the N function that I see in rrd.php to set the time for the update. I am unclear on where the time is coming from.

I would appreciate any help in finding why the unix time stamp in in my rrds is -6 relative to GMT and them getting readjusted to an additional -6.

thanks!

turdferguson
Posts: 3
Joined: Tue Feb 14, 2012 10:52 am

Re: Help with rrd.php/ out of sync data

#2 Post by turdferguson » Tue Feb 14, 2012 11:34 am

I should also add that when I look at mysql, the start_time and end_time in poller_time show GMT time 6 hours ahead of my local time. The poller table is empty. Also poller_output is empty.

It looks to my untrained eye that the date should be coming from poller_output.time.

turdferguson
Posts: 3
Joined: Tue Feb 14, 2012 10:52 am

Re: Help with rrd.php/ out of sync data

#3 Post by turdferguson » Wed Feb 15, 2012 3:45 pm

I changed the database timezone to -06:00 and the data has the correct timestamp now.

User avatar
mokeybrains
Posts: 42
Joined: Mon Aug 22, 2005 9:39 pm
Location: San Francisco, CA
Contact:

Re: Help with rrd.php/ out of sync data

#4 Post by mokeybrains » Sat Mar 10, 2012 1:21 am

I had a timezone problem and found that (after an upgrade) graph_image.php didn't have TZ set in it's environment. The fix is here:
http://forums.cacti.net/viewtopic.php?f ... 08#p227508

Post Reply