Comments on: mycheckpoint, discontinued https://shlomi-noach.github.io/blog/mysql/mycheckpoint-discontinued Blog by Shlomi Noach Sat, 08 Mar 2014 12:04:12 +0000 hourly 1 https://wordpress.org/?v=5.3.3 By: Peter Laursen https://shlomi-noach.github.io/blog/mysql/mycheckpoint-discontinued/comment-page-1#comment-232649 Sat, 08 Mar 2014 12:04:12 +0000 https://shlomi-noach.github.io/blog/?p=6745#comment-232649 “today there are more counters & variables than possible table columns”.

We (Webyog) realized this when developing MONyog. Refer http://blog.webyog.com/2009/07/29/monyog-database-schema-explained/

You cannot foresee what server and status variables will be availble in the future. For that reason we implemented a key-value storage in SQL as described:


1) Everytime MONyog sends a statement like SHOW VARIABLES/STATUS of some kind (or fetching a OS metric from Linux /proc folder) one row is INSERTED into [timestamp_master] table with information about current time and the metrics retrieved for each such statement will be INSERTED into [snapshot_master]. The [snapshot_master] table contains the metrics details. The [timestamp_id] column identifies when metric details were like that. And also note that timestamps in MONyog databases are unix_timestamps.

2) And actually we do not always INSERT into [snapshot_master]. Only if the particular metric was changed since last time something was INSERTED for that metric we will INSERT again. So if you want to find the value of a metric at some particular time you will need to find the most recent value stored before that particular time for that particular metric.

]]>