Linux: rsyslog.conf 配置
refer to: https://www.debian.org/doc/manuals/debian-handbook/sect.syslog.en.html
日志子系统
Each log message is associated with an application subsystem (called “facility” in the documentation):auth and authpriv: for authentication;
cron: comes from task scheduling services, cron and atd;
daemon: affects a daemon without any special classification (DNS, NTP, etc.);
ftp: concerns the FTP server;
kern: message coming from the kernel;
lpr: comes from the printing subsystem;
mail: comes from the e-mail subsystem;
news: Usenet subsystem message (especially from an NNTP — Network News Transfer Protocol — server that manages newsgroups);
syslog: messages from the syslogd server, itself;
user: user messages (generic);
uucp: messages from the UUCP server (Unix to Unix Copy Program, an old protocol notably used to distribute e-mail messages);
local0 to local7: reserved for local use.日志级别
Each message is also associated with a priority level. Here is the list in decreasing order:emerg: “Help!” There is an emergency, the system is probably unusable.
alert: hurry up, any delay can be dangerous, action must be taken immediately;
crit: conditions are critical;
err: error;
warn: warning (potential error);
notice: conditions are normal, but the message is important;
info: informative message;
debug: debugging message.配置规则(selector + action)
The syntax of the /etc/rsyslog.conf file is detailed in the rsyslog.conf(5) manual page, but there is also HTML documentation available in the rsyslog-doc package (/usr/share/doc/rsyslog-doc/html/index.html). The overall principle is to write “selector” and “action” pairs. The selector defines all relevant messages, and the action describes how to deal with them.
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none /var/log/messages
# 除了 mail authpriv cron 这几个子系统,其他子系统的info及以上的日志都记录到/var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
# Log all the mail messages in one place.
mail.* -/var/log/maillog
# Log cron stuff
cron.* /var/log/cron
# Everybody gets emergency messages
*.emerg :omusrmsg:*
# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler
# Save boot messages also to boot.log
local7.* /var/log/boot.log
Linux: rsyslog.conf 配置的更多相关文章
- linux limits.conf 配置
转自:http://kerry.blog.51cto.com/172631/300784 limits.conf 文件实际是 Linux PAM(插入式认证模块,Pluggable Authentic ...
- Linux主机安全配置规范
一.账号口令 1 配置口令最小长度 在文件/etc/login.defs中设置 PASS_MIN_LEN,参考值:8 2 配置口令生存周期 在文件/etc/login.defs中设置 ...
- linux下Nginx配置文件(nginx.conf)配置设置详解(windows用phpstudy集成)
linux备份nginx.conf文件举例: cp /usr/local/nginx/nginx.conf /usr/local/nginx/nginx.conf-20171111(日期) 在进程列表 ...
- linux系统下nginx安装目录和nginx.conf配置文件目录
linux系统下nginx安装目录和nginx.conf配置文件目录 1.查看nginx安装目录 输入命令 # ps -ef | grep nginx 返回结果包含安装目录 root 26 ...
- LINUX优化得很好的sysctl.conf配置
最近找了个不错的sysctl.conf的优化参数,在网站响应上已经算不错了的,time超时连接据说几乎为0了. 系统:centos 5.x sysctl.conf配置参数: kernel.msgmn ...
- Linux下/etc/resolv.conf 配置DNS客户
文件/etc/resolv.conf配置DNS客户,它包含了主机的域名搜索顺序和DNS服务器的地址,每一行应包含一个关键字和一个或多个的由空格隔开的参数.下面是一个例子文件: search mydom ...
- linux 登录档配置分析
登录档的重要性 解决系统方面的错误: 解决网络服务的问题: 过往事件记录簿: Linux 常见的登录档档名 /var/log/cron: 你的 crontab 排程有没有实际被进行? 进行过程有没有发 ...
- 003-centos7:rsyslog简单配置客户端和服务器端
实现把一个主机作为客户端,把日志发送到指定的服务器端: [服务器端] 开放tcp端口,udp端口: vim /etc/rsyslog.conf: # Provides UDP syslog recep ...
- Linux网络属性配置
目录 IP地址分类 如何将Linux主机接入到网络中 网络接口的命名方式 ifcfg系列命令 如何配置主机名 如何配置DNS服务器指向 iproute2系列命令 Linux管理网络服务 永久生效配置路 ...
- 阿里云服务器Linux CentOS安装配置(八)nginx安装、配置、域名绑定
阿里云服务器Linux CentOS安装配置(八)nginx安装.配置.域名绑定 1.安装nginx yum -y install nginx 2.启动nginx service nginx star ...
随机推荐
- redhat中如何设置开机启动脚本
redhat中如何设置开机启动脚本 前面转载了一篇关于开机启动脚本的文章,觉得写的很详细了,但是自己没有实践,下面是自己实践了一种方式,来设置开机启动脚本(因为有时候我们必须开机关闭一些防火墙,SEL ...
- Vue中插槽的使用
1.作用:让父组件可以向子组件指定位置插入html结构,也是一种组件间通信的方式,适用于 父组件 ===> 子组件 . 2.分类:默认插槽.具名插槽.作用域插槽 3.使用方式: ①默认插槽 ...
- Python LOG-日志
LOG https://www.cnblogs.com/yyds/p/6901864.html logging logging模块提供模块级别的函数记录日志 包括四大组件 1. 日志相关概念 日志 日 ...
- Python 字典嵌套
字典嵌套 含义:将一系列字典存储在列表中,或将列表作为值存储在字典中 在列表中嵌套字典.在字典中嵌套列表.在字典中嵌套字典 字典列表 创建多个字典,将字典存放在列表中 使用range()自动生成多个字 ...
- 浅谈ArrayList和LinkedList
文章目录 前言 ArrayList和LinkedList List的方法 ArrayList add remove LinkedList remove get和peek push ArrayList和 ...
- 分享一下.net core mvc的ModelStateExtend
主要代码: using Cracker.Core.Function; using Microsoft.AspNetCore.Mvc.ModelBinding; namespace Cracker.Co ...
- 【Python基础】推导式(列表、字典、集合)
推导式是一种简洁.高效的语法,用于从一个可迭代对象中生成新的可迭代(iterable)对象. 通常情况下,在以下情况可以考虑使用推导式: 只需要简单的表达式来计算新的可迭代对象的元素. 可迭代对象不是 ...
- React笔记-组件通信(六)
React笔记-组件通信(六) props概念 props是组件之间通讯的纽带 props也是组件中内置的一个属性 通过父级组件传入 在类组件里 可以直接通过this.props获取 注意: prop ...
- 2022-05-30:给定一个n*2的二维数组,表示有n个任务。 一个信息是任务能够开始做的时间,另一个信息是任务的结束期限,后者一定大于前者,且数值上都是正数, 你作为单线程的人,不能并行处理任务,
2022-05-30:给定一个n*2的二维数组,表示有n个任务. 一个信息是任务能够开始做的时间,另一个信息是任务的结束期限,后者一定大于前者,且数值上都是正数, 你作为单线程的人,不能并行处理任务, ...
- 2021-12-30:分裂问题。 一个数n,可以分裂成一个数组[n/2, n%2, n/2], 这个数组中哪个数不是1或者0,就继续分裂下去。 比如 n = 5,一开始分裂成[2, 1, 2], [2
2021-12-30:分裂问题. 一个数n,可以分裂成一个数组[n/2, n%2, n/2], 这个数组中哪个数不是1或者0,就继续分裂下去. 比如 n = 5,一开始分裂成[2, 1, 2], [2 ...