Skip to content

Commit 4dc76e7

Browse files
committed
space out according to check_postgres.pl
1 parent 6ec1e55 commit 4dc76e7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

check_postgres.pl.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,46 +1331,58 @@ <h2><a name="query_time"><strong>query_time</strong></a></h2>
13311331
check_postgres_query_time --port=5432 --includeuser=don --warning=20s</pre>
13321332
<p>For MRTG output, returns the length in seconds of the longest running query on the first line. The fourth
13331333
line gives the name of the database.</p>
1334+
13341335
<p>
13351336
</p>
1337+
13361338
<h2><a name="replicate_row"><strong>replicate_row</strong></a></h2>
1339+
13371340
<p>(<code>symlink: check_postgres_replicate_row</code>) Checks that master-slave replication is working to one or more slaves.
1341+
13381342
The slaves are specified the same as the normal databases, except with
13391343
the number 2 at the end of them, so &quot;--port2&quot; instead of &quot;--port&quot;, etc.
13401344
The values or the <em>--warning</em> and <em>--critical</em> options are units of time, and
13411345
at least one must be provided (no defaults). Valid units are 'seconds', 'minutes', 'hours',
13421346
or 'days'. Each may be written singular or abbreviated to just the first letter.
13431347
If no units are given, the units are assumed to be seconds.</p>
1348+
13441349
<p>This check updates a single row on the master, and then measures how long it
13451350
takes to be applied to the slaves. To do this, you need to pick a table that
13461351
is being replicated, then find a row that can be changed, and is not going
13471352
to be changed by any other process. A specific column of this row will be changed
13481353
from one value to another. All of this is fed to the <code>repinfo</code> option, and should
13491354
contain the following options, separated by commas: table name, primary key, key id,
13501355
column, first value, second value.</p>
1356+
13511357
<p>Example 1: Slony is replicating a table named 'orders' from host 'alpha' to
13521358
host 'beta', in the database 'sales'. The primary key of the table is named
13531359
id, and we are going to test the row with an id of 3 (which is historical and
13541360
never changed). There is a column named 'salesrep' that we are going to toggle
13551361
from a value of 'slon' to 'nols' to check on the replication. We want to throw
13561362
a warning if the replication does not happen within 10 seconds.</p>
1363+
13571364
<pre>
13581365
check_postgres_replicate_row --host=alpha --dbname=sales --host2=beta
13591366
--dbname2=sales --warning=10 --repinfo=orders,id,3,salesrep,slon,nols</pre>
1367+
13601368
<p>Example 2: Bucardo is replicating a table named 'receipt' from host 'green'
13611369
to hosts 'red', 'blue', and 'yellow'. The database for both sides is 'public'.
13621370
The slave databases are running on port 5455. The primary key is named 'receipt_id',
13631371
the row we want to use has a value of 9, and the column we want to change for the
13641372
test is called 'zone'. We'll toggle between 'north' and 'south' for the value of
13651373
this column, and throw a critical if the change is not on all three slaves within 5 seconds.</p>
1374+
13661375
<pre>
13671376
check_postgres_replicate_row --host=green --port2=5455 --host2=red,blue,yellow
13681377
--critical=5 --repinfo=receipt,receipt_id,9,zone,north,south</pre>
1378+
13691379
<p>For MRTG output, returns on the first line the time in seconds the replication takes to finish.
13701380
The maximum time is set to 4 minutes 30 seconds: if no replication has taken place in that long
13711381
a time, an error is thrown.</p>
1382+
13721383
<p>
13731384
</p>
1385+
13741386
<h2><a name="same_schema"><strong>same_schema</strong></a></h2>
13751387
<p>(<code>symlink: check_postgres_same_schema</code>) Verifies that two or more databases are identical as far as their
13761388
schema (but not the data within). This is particularly handy for making sure your slaves have not

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy