Merge lp:~percona-toolkit-dev/percona-toolkit/fix-pt-heartbeat-docs-bug-1137556-2.1 into lp:percona-toolkit/2.1

Proposed by Daniel Nichter on 2013-06-28
Status: Merged
Merged at revision: 536
Proposed branch: lp:~percona-toolkit-dev/percona-toolkit/fix-pt-heartbeat-docs-bug-1137556-2.1
Merge into: lp:percona-toolkit/2.1
Diff against target: 42 lines (+16/-3)
1 file modified
bin/pt-heartbeat (+16/-3)
To merge this branch: bzr merge lp:~percona-toolkit-dev/percona-toolkit/fix-pt-heartbeat-docs-bug-1137556-2.1
Reviewer Review Type Date Requested Status
Daniel Nichter Approve on 2013-06-28
Review via email:
To post a comment you must log in.
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/pt-heartbeat'
2--- bin/pt-heartbeat 2013-04-04 23:25:33 +0000
3+++ bin/pt-heartbeat 2013-06-28 18:17:30 +0000
4@@ -5576,6 +5576,10 @@
5 The heartbeat table requires at least one row. If you manually create the
6 heartbeat table, then you must insert a row by doing:
8+ INSERT INTO heartbeat (ts, server_id) VALUES (NOW(), N);
10+or if using L<"--utc">:
12 INSERT INTO heartbeat (ts, server_id) VALUES (UTC_TIMESTAMP(), N);
14 where C<N> is the server's ID; do not use @@server_id because it will replicate
15@@ -5594,6 +5598,10 @@
16 of a multi-slave hierarchy like "master -> slave1 -> slave2".
17 To manually insert the one required row into a legacy table:
19+ INSERT INTO heartbeat (id, ts) VALUES (1, NOW());
21+or if using L<"--utc">:
23 INSERT INTO heartbeat (id, ts) VALUES (1, UTC_TIMESTAMP());
25 The tool automatically detects if the heartbeat table is legacy.
26@@ -5879,9 +5887,14 @@
27 not check or adjust for different system or MySQL time zones which can
28 cause the tool to compute the lag incorrectly. Specifying this option is
29 a good idea because it ensures that the tool works correctly regardless of
30-time zones, but it also makes the tool backwards-incompatible with
31-pt-heartbeat 2.1.9 and older (unless the older version of pt-heartbeat
32-is running on a system that uses UTC).
33+time zones.
35+If used, this option must be used for all pt-heartbeat instances:
36+L<"--update">, L<"--monitor">, L<"--check">, etc. You should probably
37+set the option in a L<"--config"> file. Mixing this option with pt-heartbeat
38+instances not using this option will cause false-positive lag readings
39+due to different time zones (unless all your systems are set to use UTC,
40+in which case this option isn't required).
42 =item --version


People subscribed via source and target branches