26 rsyslog 安装及 修改 sshd 服务日志记录 – 进阶篇 1https://www.bndstone.com/1233.html 8-1. 不用local5模块,换别的模块 [3-1 步骤换下面的] 例如: 127.0.0.1-20190901.log 1vi /etc/rsyslog.conf 然后在GLOBAL DIRECTIVE块 追加以下的模板 123$template Remotelogs,"/var/log/%FROMHOST-IP%-%$YEAR%%$MONTH%%$DAY%.log" * *.* ?Remotelogs & ~ 备注: 123456789101112131415$template […]
Category Archives: Rsyslog
25 rsyslog命令详解 1-1. 查看是否已安装服务rsyslog 1rpm -qa | grep rsyslog 2-1. 安装 rsyslog 1yum install -y rsyslog 3-1. 查看服务状态rsyslog 1systemctl status rsyslog.service 3-2. 启动服务rsyslog 1systemctl start rsyslog.service 3-3. 关闭服务rsyslog 1systemctl stop rsyslog.service 3-4. 重启服务rsyslog 1systemctl restart rsyslog.service 3-5. 设置开机启动项服务rsyslog 1systemctl enable rsyslog.service 3-6. 取消开机启动项服务rsyslog 1systemctl disable rsyslog.service 4-1. 列出各种服务开机是否启动 1systemctl list-unit-files 4-2. 列出rsyslog服务是否开机启动 1systemctl list-unit-files | […]
24 rsyslog 安装及 修改 sshd 服务日志记录 12345https://blog.csdn.net/weixin_34194551/article/details/89782299 https://www.cnblogs.com/zhouhbing/p/4004306.html https://www.solves.com.cn/it/wlyx/fwq/2019-09-27/5522.html https://blog.csdn.net/jack__cj/article/details/54645006 http://blog.chinaunix.net/uid-26925027-id-3248201.html 1-1. 查看是否已安装服务rsyslog 1rpm -qa | grep rsyslog 2-1. 安装 rsyslog 1yum install -y rsyslog 3-1. 编辑syslog配置文件 – 监听端口 1vi /etc/rsyslog.conf 1234567# Provides UDP syslog reception $ModLoad imudp //这个注释#要去掉 $UDPServerRun […]