我如何停止 xinetd mysql 服务检查以记录每次成功?检查成功后,它会每秒创建一个日志条目,我无法使用 log_on_failure,因为该服务只检查 mysqld,如果未运行,则将 status=1。
以下是我的mysqlchck
脚本
service mysqlchk
{
# this is a config for xinetd, place it in /etc/xinetd.d/
disable = no
flags = REUSE IPv4
socket_type = stream
port = 9200
wait = no
user = nobody
server = /vvond/install/vvond-clustercheck
log_on_failure += USERID
only_from = 0.0.0.0/0
#
# Passing arguments to clustercheck
# <user> <pass> <available_when_donor=0|1> <log_file> <available_when_readonly=0|1> <defaults_extra_file>"
# Recommended: server_args = user pass 1 /var/log/log-file 0 /etc/my.cnf.local"
# Compatibility: server_args = user pass 1 /var/log/log-file 1 /etc/my.cnf.local"
# 55-to-56 upgrade: server_args = user pass 1 /var/log/log-file 0 /etc/my.cnf.extra"
#
# recommended to put the IPs that need
# to connect exclusively (security purposes)
per_source = UNLIMITED
}
答案1
您可以为 log_on_success 添加一个空白条目并重新启动 xinetd。
{ ... log_on_success = ...}