{"id":282,"date":"2009-12-16T20:42:30","date_gmt":"2009-12-16T18:42:30","guid":{"rendered":"http:\/\/code.openark.org\/forge\/?page_id=282"},"modified":"2010-09-06T09:56:35","modified_gmt":"2010-09-06T07:56:35","slug":"remote-multiple-hosts","status":"publish","type":"page","link":"https:\/\/code.openark.org\/forge\/mycheckpoint\/documentation\/remote-multiple-hosts","title":{"rendered":"Remote &#038; multiple hosts"},"content":{"rendered":"<p>With <em>mycehckpoint<\/em>, one may:<\/p>\n<ul>\n<li>Monitor a server, storing monitored date to same server, or<\/li>\n<li>Monitor one server, storing monitored data to another server.<\/li>\n<\/ul>\n<p>In either case, the monitored server does not need to be local; the script can monitor\/store to any remote server, via MySQL TCP\/IP connections.<\/p>\n<p>The second case, however, is more of an interest, as it solves the issue of monitoring nodes in replication topologies.<\/p>\n<p>Say we have the following servers:<\/p>\n<blockquote><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-305\" title=\"replication\" src=\"http:\/\/code.openark.org\/forge\/wp-content\/uploads\/2009\/12\/replication.png\" alt=\"replication\" width=\"400\" height=\"254\" srcset=\"https:\/\/code.openark.org\/forge\/wp-content\/uploads\/2009\/12\/replication.png 400w, https:\/\/code.openark.org\/forge\/wp-content\/uploads\/2009\/12\/replication-300x190.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p><\/blockquote>\n<p><strong>wallace<\/strong>, being the master node, is the writable node. <strong>gromit<\/strong> &amp; <strong>shawn<\/strong>, being slave nodes, are read only.<\/p>\n<h4>Monitoring multiple hosts<\/h4>\n<p><em>mycheckpoint<\/em> suggests that you have three distinct schemata, one per monitored host. You should then have the following three databases, for example:<\/p>\n<ol>\n<li><strong>mycheckpoint_wallace<\/strong><\/li>\n<li><strong>mycheckpoint_gromit<\/strong><\/li>\n<li><strong>mycheckpoint_shawn<\/strong><\/li>\n<\/ol>\n<p>All of the above must pre-exist, via <strong>CREATE DATABASE<\/strong>. The monitoring account must have all privileges on these databases.<\/p>\n<p>Monitoring all three nodes is accomplished by monitoring them distinctly. But this can be done in various ways:<\/p>\n<ul>\n<li><em>mycheckpoint<\/em> is executed on <strong>wallace<\/strong> only, leading to:<\/li>\n<\/ul>\n<blockquote>\n<pre>root@wallace# mycheckpoint --host=localhost --monitored-host=<strong>wallace<\/strong> --database=<strong>mycheckpoint_wallace<\/strong>\r\nroot@wallace# mycheckpoint --host=localhost --monitored-host=<strong>gromit<\/strong>  --database=<strong>mycheckpoint_gromit<\/strong>\r\nroot@wallace# mycheckpoint --host=localhost --monitored-host=<strong>shawn<\/strong>   --database=<strong>mycheckpoint_shawn<\/strong><\/pre>\n<\/blockquote>\n<ul>\n<li><em>mycheckpoint<\/em> is installed and executed on the three hosts:<\/li>\n<\/ul>\n<blockquote>\n<pre>root@<strong>wallace<\/strong># mycheckpoint --host=wallace --monitored-host=localhost --database=<strong>mycheckpoint_wallace<\/strong>\r\nroot@<strong>gromit<\/strong>#  mycheckpoint --host=wallace --monitored-host=localhost --database=<strong>mycheckpoint_gromit<\/strong>\r\nroot@<strong>shawn<\/strong>#   mycheckpoint --host=wallace --monitored-host=localhost --database=<strong>mycheckpoint_shawn<\/strong><\/pre>\n<\/blockquote>\n<ul>\n<li><em>mycheckpoint<\/em> is installed and executed on an altogether different host.<\/li>\n<\/ul>\n<p>And, of course, hybrid solutions are possible, as well. At any case, the <em>host<\/em> used is always the master node.<\/p>\n<h4>Which of the three options is best?<\/h4>\n<p>The first and third ones requires the least installations: you only need to have <em>mycheckpoint<\/em> installed on one host.<\/p>\n<p>The first requires less servers since it utilizes the master node.<\/p>\n<p>As of revision <strong>72<\/strong>, <em>mycheckpoint<\/em> monitors Linux OS data: CPU, memory, load average, disk usage, swap activity. This only occurs when monitoring the local machine. This stands in favor of the second option.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With mycehckpoint, one may: Monitor a server, storing monitored date to same server, or Monitor one server, storing monitored data to another server. In either case, the monitored server does not need to be local; the script can monitor\/store to any remote server, via MySQL TCP\/IP connections. The second case, however, is more of an [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":147,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-282","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/code.openark.org\/forge\/wp-json\/wp\/v2\/pages\/282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code.openark.org\/forge\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/code.openark.org\/forge\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/code.openark.org\/forge\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/code.openark.org\/forge\/wp-json\/wp\/v2\/comments?post=282"}],"version-history":[{"count":21,"href":"https:\/\/code.openark.org\/forge\/wp-json\/wp\/v2\/pages\/282\/revisions"}],"predecessor-version":[{"id":321,"href":"https:\/\/code.openark.org\/forge\/wp-json\/wp\/v2\/pages\/282\/revisions\/321"}],"up":[{"embeddable":true,"href":"https:\/\/code.openark.org\/forge\/wp-json\/wp\/v2\/pages\/147"}],"wp:attachment":[{"href":"https:\/\/code.openark.org\/forge\/wp-json\/wp\/v2\/media?parent=282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}