mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
Make the monitoring history capabilities of repmgr be optional and
turned off by default. Most of it has been superseeded by pg_stat_replication view, we can still start it by using the switch --monitoring-history
This commit is contained in:
@@ -1013,6 +1013,7 @@ The output from this program looks like this::
|
|||||||
--help show this help, then exit
|
--help show this help, then exit
|
||||||
--version output version information, then exit
|
--version output version information, then exit
|
||||||
--verbose output verbose activity information
|
--verbose output verbose activity information
|
||||||
|
--monitoring-history track advance or lag of the replication in every standby in repl_monitor
|
||||||
-f, --config_file=PATH database to connect to
|
-f, --config_file=PATH database to connect to
|
||||||
|
|
||||||
repmgrd monitors a cluster of servers.
|
repmgrd monitors a cluster of servers.
|
||||||
@@ -1043,6 +1044,10 @@ Lag monitoring
|
|||||||
repmgrd helps monitor a set of master and standby servers. You can
|
repmgrd helps monitor a set of master and standby servers. You can
|
||||||
see which node is the current master, as well as how far behind each
|
see which node is the current master, as well as how far behind each
|
||||||
is from current.
|
is from current.
|
||||||
|
To activate the monitor capabilities of repmgr you must include the
|
||||||
|
option --monitoring-history when running it::
|
||||||
|
|
||||||
|
repmgrd --monitoring-history --config-file=/path/to/repmgr.conf &
|
||||||
|
|
||||||
To look at the current lag between primary and each node listed
|
To look at the current lag between primary and each node listed
|
||||||
in ``repl_node``, consult the ``repl_status`` view::
|
in ``repl_node``, consult the ``repl_status`` view::
|
||||||
|
|||||||
15
repmgrd.c
15
repmgrd.c
@@ -65,7 +65,7 @@ const char *progname;
|
|||||||
|
|
||||||
char *config_file = DEFAULT_CONFIG_FILE;
|
char *config_file = DEFAULT_CONFIG_FILE;
|
||||||
bool verbose = false;
|
bool verbose = false;
|
||||||
bool no_history = false;
|
bool monitoring_history = false;
|
||||||
char repmgr_schema[MAXLEN];
|
char repmgr_schema[MAXLEN];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -114,7 +114,7 @@ main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
{"config", required_argument, NULL, 'f'},
|
{"config", required_argument, NULL, 'f'},
|
||||||
{"verbose", no_argument, NULL, 'v'},
|
{"verbose", no_argument, NULL, 'v'},
|
||||||
{"no-history", no_argument, NULL, 'N'},
|
{"monitoring-history", no_argument, NULL, 'm'},
|
||||||
{NULL, 0, NULL, 0}
|
{NULL, 0, NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((c = getopt_long(argc, argv, "f:v:N", long_options, &optindex)) != -1)
|
while ((c = getopt_long(argc, argv, "f:v:m", long_options, &optindex)) != -1)
|
||||||
{
|
{
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
@@ -149,8 +149,8 @@ main(int argc, char **argv)
|
|||||||
case 'v':
|
case 'v':
|
||||||
verbose = true;
|
verbose = true;
|
||||||
break;
|
break;
|
||||||
case 'N':
|
case 'm':
|
||||||
no_history = true;
|
monitoring_history = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
@@ -358,7 +358,7 @@ WitnessMonitor(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Fast path for the case where no history is requested */
|
/* Fast path for the case where no history is requested */
|
||||||
if (no_history)
|
if (!monitoring_history)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -479,7 +479,7 @@ StandbyMonitor(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Fast path for the case where no history is requested */
|
/* Fast path for the case where no history is requested */
|
||||||
if (no_history)
|
if (!monitoring_history)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -925,6 +925,7 @@ void help(const char *progname)
|
|||||||
printf(_(" --help show this help, then exit\n"));
|
printf(_(" --help show this help, then exit\n"));
|
||||||
printf(_(" --version output version information, then exit\n"));
|
printf(_(" --version output version information, then exit\n"));
|
||||||
printf(_(" --verbose output verbose activity information\n"));
|
printf(_(" --verbose output verbose activity information\n"));
|
||||||
|
printf(_(" --monitoring-history track advance or lag of the replication in every standby in repl_monitor\n"));
|
||||||
printf(_(" -f, --config_file=PATH configuration file\n"));
|
printf(_(" -f, --config_file=PATH configuration file\n"));
|
||||||
printf(_("\n%s monitors a cluster of servers.\n"), progname);
|
printf(_("\n%s monitors a cluster of servers.\n"), progname);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user