problem after chage timezone

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

Moderators: Developers, Moderators

b4nsh33
Posts: 16
Joined: Mon Jan 29, 2007 9:59 am

problem after chage timezone

Post by b4nsh33 »

Hello to all, im having a strange problem after i changed the timezone from eastern time to central time, now the graphs shows an interval with no data at the end of the graph (see attachement from details) ,adn the is a delay of around 30 minutes beteeen updates, what can i check?
Attachments
graph.PNG
graph.PNG (18.04 KiB) Viewed 3436 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Changing timezone (or system time) in any ways affects rrdtool as it uses the timestamps to update rrd files. Updates in the past are not possible. Using UTC is generally a good idea.
Reinhard
b4nsh33
Posts: 16
Joined: Mon Jan 29, 2007 9:59 am

Post by b4nsh33 »

so, i cant do anything to solve the issue?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please switch to verbosity=DEBUG for a single run. Then run "php -q poller.php --force" from command line. If rrdtool update errors claiming bad update timestamps occur, my assumption is correct.
In this case, you either may change timezone back or simply wait until the time lag has passed by.
Reinhard
b4nsh33
Posts: 16
Joined: Mon Jan 29, 2007 9:59 am

Post by b4nsh33 »

i think you are right. i got lots of these errors:

ERROR: illegal attempt to update using time 1210613716 when last update time is 1210613716 (minimum one second step)
05/12/2008 01:35:46 PM - SYSTEM STATS: Time:34.6804 Method:cactid Processes:5 Threads:25 Hosts:373 HostsPerProcess:75 DataSources:1620 RRDsProcessed:484
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Form both numbers, you may compute the time left for you waiting for graphs to come up again
Reinhard
b4nsh33
Posts: 16
Joined: Mon Jan 29, 2007 9:59 am

Post by b4nsh33 »

hey, both are the same!!!
???
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Oops, yes. Did not look very closely. Please see 2nd link of my sig, double poller issue
Reinhard
b4nsh33
Posts: 16
Joined: Mon Jan 29, 2007 9:59 am

Post by b4nsh33 »

thanks gandalf, i followed your tutorial and i didnt found any relevant in the log, this is the complete result:

mmiranda@cacti:/var/log/cacti$ sudo cactid --verbosity=5 784 784
CACTID: Using cactid config file [/etc/cacti/cactid.conf]
CACTID: DEBUG: MySQL Query ID '0': 'SELECT value FROM settings WHERE name = 'path_webroot''
CACTID: DEBUG: MySQL Query ID '0': OK
CACTID: DEBUG: MySQL Query ID '1': 'SELECT value FROM settings WHERE name = 'path_cactilog''
CACTID: DEBUG: MySQL Query ID '1': OK
CACTID: DEBUG: The path_php_server variable is /usr/share/cacti/site/script_server.php
CACTID: DEBUG: The path_cactilog variable is /usr/share/cacti/site/log/cacti.log
CACTID: DEBUG: MySQL Query ID '2': 'SELECT value FROM settings WHERE name = 'log_destination''
CACTID: DEBUG: MySQL Query ID '2': OK
CACTID: DEBUG: The log_destination variable is 1 (FILE)
CACTID: DEBUG: MySQL Query ID '3': 'SELECT value FROM settings WHERE name = 'path_php_binary''
CACTID: DEBUG: MySQL Query ID '3': OK
CACTID: DEBUG: The path_php variable is /usr/bin/php
CACTID: DEBUG: MySQL Query ID '4': 'SELECT value FROM settings WHERE name = 'availability_method''
CACTID: DEBUG: MySQL Query ID '4': OK
CACTID: DEBUG: The availability_method variable is 1
CACTID: DEBUG: MySQL Query ID '5': 'SELECT value FROM settings WHERE name = 'ping_recovery_count''
CACTID: DEBUG: MySQL Query ID '5': OK
CACTID: DEBUG: The ping_recovery_count variable is 3
CACTID: DEBUG: MySQL Query ID '6': 'SELECT value FROM settings WHERE name = 'ping_failure_count''
CACTID: DEBUG: MySQL Query ID '6': OK
CACTID: DEBUG: The ping_failure_count variable is 2
CACTID: DEBUG: MySQL Query ID '7': 'SELECT value FROM settings WHERE name = 'ping_method''
CACTID: DEBUG: MySQL Query ID '7': OK
CACTID: DEBUG: The ping_method variable is 2
CACTID: DEBUG: MySQL Query ID '8': 'SELECT value FROM settings WHERE name = 'ping_retries''
CACTID: DEBUG: MySQL Query ID '8': OK
CACTID: DEBUG: The ping_retries variable is 1
CACTID: DEBUG: MySQL Query ID '9': 'SELECT value FROM settings WHERE name = 'ping_timeout''
CACTID: DEBUG: MySQL Query ID '9': OK
CACTID: DEBUG: The ping_timeout variable is 400
CACTID: DEBUG: MySQL Query ID '10': 'SELECT value FROM settings WHERE name = 'log_perror''
CACTID: DEBUG: MySQL Query ID '10': OK
CACTID: DEBUG: The log_perror variable is 1
CACTID: DEBUG: MySQL Query ID '11': 'SELECT value FROM settings WHERE name = 'log_pwarn''
CACTID: DEBUG: MySQL Query ID '11': OK
CACTID: DEBUG: The log_pwarn variable is 1
CACTID: DEBUG: MySQL Query ID '12': 'SELECT value FROM settings WHERE name = 'log_pstats''
CACTID: DEBUG: MySQL Query ID '12': OK
CACTID: DEBUG: The log_pstats variable is 0
CACTID: DEBUG: MySQL Query ID '13': 'SELECT value FROM settings WHERE name = 'max_threads''
CACTID: DEBUG: MySQL Query ID '13': OK
CACTID: DEBUG: The threads variable is 25
CACTID: DEBUG: MySQL Query ID '14': 'SELECT value FROM settings WHERE name = 'poller_interval''
CACTID: DEBUG: MySQL Query ID '14': OK
CACTID: DEBUG: The polling interval is the system default
CACTID: DEBUG: MySQL Query ID '15': 'SELECT value FROM settings WHERE name = 'concurrent_processes''
CACTID: DEBUG: MySQL Query ID '15': OK
CACTID: DEBUG: The number of concurrent processes is 5
CACTID: DEBUG: MySQL Query ID '16': 'SELECT value FROM settings WHERE name = 'script_timeout''
CACTID: DEBUG: MySQL Query ID '16': OK
CACTID: DEBUG: The script timeout is 25
CACTID: DEBUG: MySQL Query ID '17': 'SELECT value FROM settings WHERE name = 'php_servers''
CACTID: DEBUG: MySQL Query ID '17': OK
CACTID: DEBUG: The number of php script servers to run is 10
CACTID: DEBUG: MySQL Query ID '18': 'SELECT action FROM poller_item WHERE action=2 AND host_id BETWEEN 784 AND 784 LIMIT 1'
CACTID: DEBUG: MySQL Query ID '18': OK
CACTID: DEBUG: StartHost='784', EndHost='784', TotalPHPScripts='0'
CACTID: DEBUG: The PHP Script Server is Not Required
CACTID: DEBUG: MySQL Query ID '19': 'SELECT value FROM settings WHERE name = 'max_get_size''
CACTID: DEBUG: MySQL Query ID '19': OK
CACTID: DEBUG: The Maximum SNMP OID Get Size is 10
CACTID: CACTID: Version 0.8.6i starting
CACTID: MYSQL: Connecting to MySQL database 'cacti' on 'localhost'...
CACTID: MYSQL: Connected to MySQL database 'cacti' on 'localhost'...
CACTID: CACTID: Initializing Net-SNMP API
CACTID: DEBUG: SNMP Header Version is 5.3.1
CACTID: DEBUG: SNMP Library Version is 5.3.1
CACTID: CACTID: Initializing PHP Script Server(s)
CACTID: DEBUG: MySQL Query ID '20': 'SELECT id FROM host WHERE disabled='' AND id BETWEEN 784 AND 784 ORDER BY id'
CACTID: DEBUG: MySQL Query ID '20': OK
CACTID: DEBUG: Initial Value of Active Threads is 0
CACTID: DEBUG: Valid Thread to be Created
CACTID: DEBUG: The Value of Active Threads is 1
CACTID: DEBUG: In Poller, About to Start Polling of Host
CACTID: MYSQL: Connecting to MySQL database 'cacti' on 'localhost'...
CACTID: MYSQL: Connected to MySQL database 'cacti' on 'localhost'...
CACTID: DEBUG: MySQL Query ID '21': 'SELECT action, hostname, snmp_community, snmp_version, snmp_username, snmp_password, rrd_name, rrd_path, arg1, arg2, arg3, local_data_id, rrd_num, snmp_port, snmp_timeout FROM poller_item WHERE host_id=0 ORDER BY arg1'
CACTID: DEBUG: MySQL Query ID '21': OK
CACTID: Host[0] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
CACTID: DEBUG: Valid Thread to be Created
CACTID: DEBUG: The Value of Active Threads is 2
CACTID: DEBUG: In Poller, About to Start Polling of Host
CACTID: MYSQL: Connecting to MySQL database 'cacti' on 'localhost'...
CACTID: MYSQL: Connected to MySQL database 'cacti' on 'localhost'...
CACTID: DEBUG: MySQL Query ID '22': 'SELECT id, hostname, snmp_community, snmp_username, snmp_password, snmp_version, snmp_port, snmp_timeout, status, status_event_count, status_fail_date, status_rec_date, status_last_error, min_time, max_time, cur_time, avg_time, total_polls, failed_polls, availability FROM host WHERE id=784'
CACTID: DEBUG: MySQL Query ID '22': OK
CACTID: DEBUG: The UDP Ping return_code was -1, errno was 111, total_time was 3704.0710
CACTID: Host[784] PING Result: UDP: Host is Alive
CACTID: Host[784] SNMP Result: SNMP not performed due to setting or ping result
CACTID: DEBUG: MySQL Insert ID '0': 'update host set status='3', status_event_count='0', status_fail_date='2008-04-15 22:05:00', status_rec_date='2008-04-15 22:20:00', status_last_error='Host did not respond to SNMP, UDP: Ping timed out', min_time='0.955460', max_time='7.079010', cur_time='1.852035', avg_time='1.518823', total_polls='10162', failed_polls='22', availability='99.7835' where id='784''
CACTID: DEBUG: MySQL Insert ID '0': OK
CACTID: DEBUG: MySQL Query ID '23': 'SELECT data_query_id, action, op, assert_value, arg1 FROM poller_reindex WHERE host_id=784'
CACTID: DEBUG: MySQL Query ID '23': OK
CACTID: Host[784] RECACHE: Processing 1 items in the auto reindex cache for '200.13.169.230'
CACTID: DEBUG: MySQL Insert ID '1': 'update poller_reindex set assert_value='248561198' where host_id='784' and data_query_id='1' and arg1='.1.3.6.1.2.1.1.3.0''
CACTID: DEBUG: MySQL Insert ID '1': OK
CACTID: DEBUG: MySQL Query ID '24': 'SELECT action, hostname, snmp_community, snmp_version, snmp_username, snmp_password, rrd_name, rrd_path, arg1, arg2, arg3, local_data_id, rrd_num, snmp_port, snmp_timeout FROM poller_item WHERE host_id=784 ORDER BY arg1'
CACTID: DEBUG: MySQL Query ID '24': OK
CACTID: Host[784] DS[1719] SNMP: v2: 200.13.169.230, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.15, value: 2449073810
CACTID: Host[784] DS[1719] SNMP: v2: 200.13.169.230, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.15, value: 902853876
CACTID: DEBUG: MySQL Insert ID '2': 'INSERT INTO poller_output (local_data_id, rrd_name, time, output) VALUES (1719,'traffic_in','2008-05-14 15:40:01','2449073810'),(1719,'traffic_out','2008-05-14 15:40:01','902853876')'
CACTID: DEBUG: MySQL Insert ID '2': OK
CACTID: Host[784] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
CACTID: DEBUG: The Value of Active Threads is 1
CACTID: DEBUG: The Value of Active Threads is 0
CACTID: DEBUG: MySQL Insert ID '3': 'replace into settings (name,value) values ('date',NOW())'
CACTID: DEBUG: MySQL Insert ID '3': OK
CACTID: DEBUG: MySQL Insert ID '4': 'insert into poller_time (poller_id, start_time, end_time) values (0, NOW(), NOW())'
CACTID: DEBUG: MySQL Insert ID '4': OK
CACTID: DEBUG: Thread Cleanup Complete
CACTID: DEBUG: PHP Script Server Pipes Closed
CACTID: DEBUG: Allocated Variable Memory Freed
CACTID: CACTID: Net-SNMP API Shutdown Completed
CACTID: DEBUG: MYSQL Free & Close Completed
CACTID: Time: 0.9087 s, Threads: 25, Hosts: 2



and the graph is stiil delayed by several minutes
Attachments
graph.PNG
graph.PNG (21.02 KiB) Viewed 3352 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Is it DELAYED or do you miss data?
Reinhard
b4nsh33
Posts: 16
Joined: Mon Jan 29, 2007 9:59 am

Post by b4nsh33 »

it is delayed, the data is there, but shows up after 30 minutes or so
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

30 minutes? That's strange. Please note the rrdtool update timestamp as found in the logs and compute the "human readable time" from it. Compare it to your local time and post findings
Reinhard
b4nsh33
Posts: 16
Joined: Mon Jan 29, 2007 9:59 am

Post by b4nsh33 »

excuse me for being so dense, howe do i do that?

is it something related to this log entries?

05/19/2008 01:25:20 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/promericamax_sn_miguel_traffic_in_1613.rrd --template traffic_out:traffic_in 1211217919:2079409040:975950534
05/19/2008 01:25:20 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/compupart_internet_traffic_in_1811.rrd --template traffic_out:traffic_in 1211217919:301606542:1597826140
05/19/2008 01:25:20 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/swifttrade_traffic_in_1609.rrd --template traffic_out:traffic_in 1211217919:U:U

Because my localtime at this moment is 12:21 pm...
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

1211217919 is the Unix Time Stamp since epoch = number of seconds since Jan, 1st 1970
Reinhard
b4nsh33
Posts: 16
Joined: Mon Jan 29, 2007 9:59 am

Post by b4nsh33 »

ok, this is the result:

from the log:
05/26/2008 10:00:27 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/sw_atento_torre_to_taca_traffic_in_1897.rrd --template traffic_out:traffic_in 1211810426:346753852:22173018

converting epoch to localtime:
mmiranda@cacti:/var/log/cacti$ perl -e 'print scalar(localtime(1211810426)), "\n";'
Mon May 26 08:00:26 2008

the machine's localtime:
mmiranda@cacti:/var/log/cacti$ date
Mon May 26 09:01:14 CST 2008

There is 1 hour interval between the poller and the machine's localtime, so the graphic has 1 hour of "empty" results at the right.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests