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 配置的更多相关文章

  1. linux limits.conf 配置

    转自:http://kerry.blog.51cto.com/172631/300784 limits.conf 文件实际是 Linux PAM(插入式认证模块,Pluggable Authentic ...

  2. Linux主机安全配置规范

    一.账号口令 1 配置口令最小长度     在文件/etc/login.defs中设置 PASS_MIN_LEN,参考值:8 2 配置口令生存周期     在文件/etc/login.defs中设置 ...

  3. linux下Nginx配置文件(nginx.conf)配置设置详解(windows用phpstudy集成)

    linux备份nginx.conf文件举例: cp /usr/local/nginx/nginx.conf /usr/local/nginx/nginx.conf-20171111(日期) 在进程列表 ...

  4. linux系统下nginx安装目录和nginx.conf配置文件目录

    linux系统下nginx安装目录和nginx.conf配置文件目录 1.查看nginx安装目录 输入命令 # ps  -ef | grep nginx 返回结果包含安装目录 root      26 ...

  5. LINUX优化得很好的sysctl.conf配置

    最近找了个不错的sysctl.conf的优化参数,在网站响应上已经算不错了的,time超时连接据说几乎为0了.  系统:centos 5.x sysctl.conf配置参数: kernel.msgmn ...

  6. Linux下/etc/resolv.conf 配置DNS客户

    文件/etc/resolv.conf配置DNS客户,它包含了主机的域名搜索顺序和DNS服务器的地址,每一行应包含一个关键字和一个或多个的由空格隔开的参数.下面是一个例子文件: search mydom ...

  7. linux 登录档配置分析

    登录档的重要性 解决系统方面的错误: 解决网络服务的问题: 过往事件记录簿: Linux 常见的登录档档名 /var/log/cron: 你的 crontab 排程有没有实际被进行? 进行过程有没有发 ...

  8. 003-centos7:rsyslog简单配置客户端和服务器端

    实现把一个主机作为客户端,把日志发送到指定的服务器端: [服务器端] 开放tcp端口,udp端口: vim /etc/rsyslog.conf: # Provides UDP syslog recep ...

  9. Linux网络属性配置

    目录 IP地址分类 如何将Linux主机接入到网络中 网络接口的命名方式 ifcfg系列命令 如何配置主机名 如何配置DNS服务器指向 iproute2系列命令 Linux管理网络服务 永久生效配置路 ...

  10. 阿里云服务器Linux CentOS安装配置(八)nginx安装、配置、域名绑定

    阿里云服务器Linux CentOS安装配置(八)nginx安装.配置.域名绑定 1.安装nginx yum -y install nginx 2.启动nginx service nginx star ...

随机推荐

  1. 百度首页静态展示页面HTML+CSS

    一直觉得百度首页很复杂的,有那么多的东西,跟这个博主学习了之后,仿写了一下,样式好像很简单 只设置的一些组件的高度而已,不得不说,CSS真是个好东西呀 话不多说,直接上代码 <!DOCTYPE ...

  2. 记一次nginx配置不当引发的499与failover 机制失效

    背景 nginx 499在服务端推送流量高峰期长期以来都是存在的,间或还能达到告警阈值触发一小波告警,但主观上一直认为499是客户端主动断开,可能和推送高峰期的用户打开推送后很快杀死app有关,没有进 ...

  3. Redis篇一之基础数据结构

    文章目录 Redis的数据结构 String类型**** Hash类型 List类型 Set类型 SortedSet类型 BitMap类型 HyperLogLog 总结 Redis诞生于2009年全称 ...

  4. 浅谈如何使用 github.com/kardianos/service

    在实际开发过程中,有时候会遇到如何编写Go开机自启服务的需求,在linux中我们可以使用systemd来进行托管,windows下可以通过注册表来实现,mac下可以通过launchd来实现,上面的方式 ...

  5. 2023-02-17:sdl是跨平台的多媒体开发库,请问用go语言如何调用?

    2023-02-17:sdl是跨平台的多媒体开发库,请问用go语言如何调用? 答案2023-02-17: 用 github.com/moonfdd/sdl2-go 这个库. 这是我自己写的golang ...

  6. 2020-12-25:MQ中,如何保证消息的顺序性?

    福哥答案2020-12-25:[稍微详细的答案:](http://bbs.xiangxueketang.cn/question/875)生产者保证消息入队的顺序.MQ 本身是一种先进先出的数据接口,将 ...

  7. PTA L1-064 估值一亿的AI核心代码

    PTA L1-064 估值一亿的AI核心代码 有坑!不少 题目链接 题目及分析 题目: 本题要求你实现一个稍微更值钱一点的 AI 英文问答程序,规则是:       1. 无论用户说什么,首先把对方说 ...

  8. 聊聊ElasticeSearch并发写的乐观锁机制

    概述 ES的多客户端并发更新是基于乐观并发控制,通过版本号机制来实现冲突检测. 关键对象 ES的老版本是用过_version字段的版本号实现乐观锁的.现在新版增加了基于_seq_no与_primary ...

  9. 百度云原生数据库GaiaDB的HTAP与多地多活技术实践

    摘要:云原生数据库在使用存算分离技术后,可以在完全兼容MYSQL协议和语法的情况下,极大提升单实例所能承载的数据规模与吞吐能力上限.但除了对客户端兼容外,对整个数据生态(地域容灾,数据分析,备份恢复) ...

  10. JDK动态代理和CGLIB代理有什么区别

    JDK动态代理和CGLIB代理都是实现Spring框架中AOP的代理方式,它们的实现原理和应用场景有所不同, 具体区别如下: 1. 实现原理: JDK动态代理是基于Java反射机制实现的,它要求目标类 ...