开启/关闭集群日志的步骤

Posted 瀚高PG实验室

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了开启/关闭集群日志的步骤相关的知识,希望对你有一定的参考价值。

目录
文档用途
详细信息

文档用途
该文档适用于hg_repmgr插件所搭建的集群。

详细信息
1.注释repmgr配置参数。

1)在’/opt/HighGo4.3.4.7-see/conf/'目录下打开hg_repmgr.conf文件,注释以下参数即关闭repmgr日志

#log_level=INFO # Log level: possible values are DEBUG, INFO, NOTICE,

                             # WARNING, ERROR, ALERT, CRIT or EMERG

#log_facility=STDERR # Logging facility: possible values are STDERR, or for

                             # syslog integration, one of LOCAL0, LOCAL1, ..., LOCAL7, USER

#log_file=’/opt/HighGo4.3.4.7-see/repmgr.log’

                             # stderr can be redirected to an arbitrary file:

注:该参数修改保存后即生效,不需要重启数据库但需要重启repmgr的守护进程repmgrd。

2.重启repmgr的守护进程repmgrd。

1)关掉repmgrd守护进程

[root@node1 conf]# repmgr daemon stop

注意:


Login User: sysdba

Login time: 2020-09-16 16:19:06.515115+08

Login Address: 192.168.0.134

Last Login Status: SUCCESS

Login Failures: 0

Valied Until: 2020-09-23 15:28:37+08


NOTICE: executing: “pkill -F /tmp/repmgrd.pid”

NOTICE: repmgrd was successfully stopped

2)启动repmgrd守护进程

[root@node1 conf]# repmgrd -d

[2020-09-16 16:24:35] [NOTICE] repmgrd (repmgrd 4.3) starting up

[2020-09-16 16:24:35] [INFO] connecting to database “host=192.168.0.134 user=sysdba password=highgo123 dbname=highgo port=5866 connect_timeout=2”

注意:


Login User: sysdba

Login time: 2020-09-16 16:24:35.899102+08

Login Address: 192.168.0.134

Last Login Status: SUCCESS

Login Failures: 0

Valied Until: 2020-09-23 15:28:37+08


[root@node1 conf]# 信息: set_repmgrd_pid(): provided pidfile is /tmp/repmgrd.pid

[2020-09-16 16:24:35] [NOTICE] starting monitoring of node “192.168.0.134” (ID: 1)

[2020-09-16 16:24:35] [INFO] “connection_check_type” set to “ping”

[2020-09-16 16:24:35] [NOTICE] monitoring cluster primary “192.168.0.134” (node ID: 1)

更多详细信息请登录【瀚高技术支持平台】查看https://support.highgo.com/#/index/docContent/6760e69501a3eb42

以上是关于开启/关闭集群日志的步骤的主要内容,如果未能解决你的问题,请参考以下文章

Kubernetes 1.25 集群搭建

php在代码中开启或关闭错误提示并将错误写入日志

如何一键开启和关闭音乐?

mysql日志

mysql开启关闭慢查询日志

配置redis主从复制