To read it, just do SELECT * FROM heartbeat_p.heartbeat;
And you will get:
+-------+----------------------------+------+
| shard | last_updated | lag |
+-------+----------------------------+------+
| s6 | 2015-11-25T20:20:32.000980 | 0 |
| s2 | 2015-11-25T20:20:32.001030 | 0 |
| s7 | 2015-11-25T20:20:32.001070 | 0 |
| s3 | 2015-11-25T20:20:32.001000 | 0 |
| s4 | 2015-11-25T20:20:32.000920 | 0 |
| s1 | 2015-11-25T20:20:32.000740 | 0 |
| s5 | 2015-11-25T20:20:32.000830 | 0 |
+-------+----------------------------+------+
Read the detailed documentation on: [2]
Use it, create a web page if you want to make it public! Report a ticket if it gets too high! Report a ticket if you need more info (a record per wiki?). But I wanted to give you the essentials, and you can build yourselves on top of that.
Only 2 know bugs:
- There is microsecond accuracy, but it cannot be used until a bug in MariaDB is fixed [3]
- enwiki will only report s1 lag until that server is restarted due to some existing filters. We will schedule that at some time in the future.