Cloud Native应用交付

  • 首页
  • 关于本站
  • 个人介绍
  • Downloads
  • Repo
    • Github
    • Container
  • F5
    • F5 Python SDK
    • F5-container
    • F5-LBaaS
  • 社交
    • 联系我
    • 微信/微博
    • 公众号
    • 打赏赞助
行至水穷处 坐看云起时
Cloud Native Application Services: cnadn.net
  1. 首页
  2. F5技术
  3. 正文

syslog配置说明

2008年07月27日 8696点热度 0人点赞 0条评论

[root@:Active] alertd # more /etc/syslog-ng/syslog-ng.conf
#全局配置

options {
   dir_perm(0755);
   perm(0644);
   chain_hostnames(no);
   keep_hostname(yes);
   stats(0);
   log_fifo_size(2048);
};

#定义所有日志信息来源

source local {
   unix-stream("/dev/log");
   pipe("/proc/kmsg");
   udp(ip(127.0.0.1) port(514));
   udp(ip(127.2.0.2) port(514));
   internal();
};

# local0.none,local2.none;local4.none;local5.none;local6.none \
#                                               /var/log/messages
filter f_notLocal0 {
   not facility(local0);
};

filter f_notLocal1 {
   not facility(local1);
};

filter f_notLocal2 {
   not facility(local2);
};

filter f_notLocal3 {
   not facility(local3);
};

filter f_notLocal4 {
   not facility(local4);
};

filter f_notLocal5 {
   not facility(local5);
};

filter f_notLocal6 {
   not facility(local6);
};

filter f_notLocal7 {
   not facility(local7);
};

filter f_messages {
   level(notice..warn)
   and not facility(auth, authpriv, cron, daemon, mail, news);
};

destination d_messages {
   file("/var/log/messages" create_dirs(yes));
};

log {#所有非BIGIP功能上的日志信息,主要是系统级信息。
   source(local);
   filter(f_notLocal0);
   filter(f_notLocal1);
   filter(f_notLocal2);
   filter(f_notLocal3);
   filter(f_notLocal4);
   filter(f_notLocal5);
   filter(f_notLocal6);
   filter(f_notLocal7);
   filter(f_messages);
   destination(d_messages);
};

# authpriv.*                                    /var/log/secure
filter f_authpriv {
   facility(auth, authpriv) and level(notice..emerg);
};

destination d_secure {
   file("/var/log/secure" create_dirs(yes));
};

log {
   source(local);
   filter(f_authpriv);
   destination(d_secure);
};

# mail.*                                        /var/log/maillog
filter f_mail {
   facility(mail) and level(notice..emerg);
};

destination d_maillog {
   file("/var/log/maillog" create_dirs(yes));
};

log {
   source(local);
   filter(f_mail);
   destination(d_maillog);
};

# cron.warning                                  /var/log/cron
filter f_cron {
   facility(cron) and level(warning..emerg);
};

destination d_cron {
   file("/var/log/cron" create_dirs(yes));
};

log {
   source(local);
   filter(f_cron);
   destination(d_cron);
};

# *daemon.*
filter f_daemon {
   facility(daemon) and level(notice..emerg);
};

destination d_daemon {
   file("/var/log/daemon.log");
};

log {
   source(local);
   filter(f_daemon);
   destination(d_daemon);
};

# kern.*
filter f_kern {
   facility(kern) and level(notice..emerg);
};

destination d_kern {
   file("/var/log/kern.log");
};

log {
   source(local);
   filter(f_kern);
   destination(d_kern);
};

# user.info..                                   /var/log/user.log
filter f_user {
   facility(user)
   and level(notice..emerg);
};

destination d_user {
   file("/var/log/user.log");
};

log {
   source(local);
   filter(f_user);
   destination(d_user);
};

# *.debug                                       /var/log/debug
#filter f_debug {
#   level(debug)
#   and not facility(auth, authpriv, news, mail);
#};

#destination d_debug {
#   file("/var/log/debug");
#};

#log {
#   source(local);
#   filter(f_debug);
#   destination(d_debug);
#};

# *.emerg                                       *
filter f_emerg {
   level(emerg);
};

destination d_console {
   usertty("*");
};

log {
   source(local);
   filter(f_emerg);
   destination(d_console);
};

# local7.*                                      /var/log/boot.log
filter f_local7 {
   facility(local7) and level(notice..emerg);
};

destination d_boot {
   file("/var/log/boot.log" create_dirs(yes));
};

log {
   source(local);
   filter(f_local7);
   destination(d_boot);
};

# local0.*                                      /var/log/ltm
filter f_local0 {
   facility(local0) and level(info..emerg);
};

destination d_ltm {
   file("/var/log/ltm" create_dirs(yes));
};

log {
   source(local);
   filter(f_local0);
   destination(d_ltm);
};

# local1.*                                      /var/log/em
filter f_local1 {
   facility(local1) and level(debug..emerg);
};

destination d_em {
   file("/var/log/em" create_dirs(yes));
};

log {
   source(local);
   filter(f_local1);
   destination(d_em);
};

#

local2.*   
;                                   /var/log/gtm
# capture output from gtmd and put it in /var/log/gtm
source s_gtm {
   pipe("/var/run/gtmd.pipe");
};
filter f_local2 {
   facility(local2) and level(debug..emerg);
};

destination d_gtm {
   file("/var/log/gtm" create_dirs(yes));
};

log {
   source(local);
   filter(f_local2);
   destination(d_gtm);
};

log {
    source(s_gtm);
    destination(d_gtm);
};

# local3.*                                      /var/log/asm
filter f_local3 {
   facility(local3) and level(info..emerg);
};

destination d_asm {
   file("/var/log/asm" create_dirs(yes));
};

log {
   source(local);
   filter(f_local3);
   destination(d_asm);
};

# local4.*                                      /var/log/ltm
filter f_local4 {
   facility(local4) and level(notice..emerg);
};

log {
   source(local);
   filter(f_local4);
   destination(d_ltm);
};

# local5.*                                      /var/log/pktfilter
filter f_local5 {
   facility(local5) and level(notice..emerg);
};

destination d_pktfilter {
   file("/var/log/pktfilter" create_dirs(yes));
};

log {
   source(local);
   filter(f_local5);
   destination(d_pktfilter);
};

# local6.*                                      /var/log/httpd/httpd_errors
filter f_local6_httpd_err {
   facility(local6) and level(notice..emerg) and (match("\\[warn\\]") or match("\\[error\\]"));
};
                                                                               
destination d_httpd_err {
   file("/var/log/httpd/httpd_errors" create_dirs(yes));
};
                                                                               
log {
   source(local);
   filter(f_local6_httpd_err);
   destination(d_httpd_err);
};
                                                                               
filter f_local6_httpd_acc {
   facility(local6) and match("\\[acc\\]");
};
                                                                               
destination d_httpd_acc {
   file("/var/log/httpd/access_log" create_dirs(yes));
};
                                                                               
log {
   source(local);
   filter(f_local6_httpd_acc);
   destination(d_httpd_acc);
};
                                                                               
filter f_local6_httpd_ssl_acc {
   facility(local6) and match("\\[ssl_acc\\]");
};
                                                                               
destination d_httpd_ssl_acc {
   file("/var/log/httpd/ssl_access_log" create_dirs(yes));
};

log {
   source(local);
   filter(f_local6_httpd_ssl_acc);
   destination(d_httpd_ssl_acc);
};
                                                                               
filter f_local6_httpd_ssl_req {
   facility(local6) and match("\\[ssl_req\\]");
};
                          &nbs

p;                                                    
destination d_httpd_ssl_req {
   file("/var/log/httpd/ssl_request_log" create_dirs(yes));
};
                                                                               
log {
   source(local);
   filter(f_local6_httpd_ssl_req);
   destination(d_httpd_ssl_req);
};

# 定义将所有日志信息发送给alert进程,以便alert执行snmp trap,lcd屏幕显示,或者邮件发送日志                                          |/var/run/alert.pipe
filter f_catchall {
   level(debug..emerg);
};

destination d_alertd {
   pipe("/var/run/alert.pipe");
};

log {
   source(local);
   filter(f_catchall);
   destination(d_alertd);
};

# capture output from tmm and put it in /var/log/tmm
source s_tmm {
   pipe("/var/run/tmm.pipe");
};
destination d_tmm {
   file("/var/log/tmm" create_dirs(yes));
};
log {
    source(s_tmm);
    destination(d_tmm);
};

# capture output from bcm56xxd and put it in /var/log/bcm56xxxd
source s_bcm56xxd {
   pipe("/var/run/bcm56xxd.pipe");
};
destination d_bcm56xxd {
   file("/var/log/bcm56xxd" create_dirs(yes));
};
log {
   source(s_bcm56xxd);
   destination(d_bcm56xxd);
};
[root@cdgdc:Active] alertd #

相关文章

  • 密码保护:F5OS tenant部署后的容器情况、网络接口情况
  • 密码保护:F5OS tenant镜像实例化后信息
  • 密码保护:F5OS docker-compose.yml
  • 密码保护:F5OS 底层容器、网络及k8s状态
  • AI Gateway PII test page - internal only
本作品采用 知识共享署名-非商业性使用 4.0 国际许可协议 进行许可
标签: 暂无
最后更新:2008年07月27日

纳米

linjing.io

打赏 点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理。

页面AI聊天助手

纳米

linjing.io

☁️迈向Cloud Native ADC ☁️

认证获得:
TOGAF: ID 152743
Kubernetes: CKA #664
Microsoft: MCSE MCDBA
Cisco: CCNP
Juniper: JNCIS
F5:
F5 Certified Solution Expert, Security
F5 Certified Technology Specialist, LTM/GTM/APM/ASM
F5 Certified BIG-IP Administrator
  • 点击查看本博技术要素列表
  • 归档
    分类
    • AI
    • Automation
    • Avi Networks
    • Cisco ACI
    • CISCO资源
    • F5 with ELK
    • F5-Tech tips
    • F5技术
    • Juniper
    • Linux
    • NGINX
    • SDN
    • ServiceMesh
    • WEB编程
    • WINDOWS相关
    • 业界文章
    • 交换机技术
    • 化云为雨/Openstack
    • 协议原理
    • 容器/k8s
    • 我的工作
    • 我的生活
    • 网站技术
    • 路由器技术
    • 项目案例
    标签聚合
    F5 gtm nginx istio openstack DNS api docker envoy k8s neutron network flannel bigip irule
    最近评论
    汤姆 发布于 8 个月前(09月10日) 嗨,楼主,里面的json怎么下载啊,怎么收费啊?
    汤姆 发布于 8 个月前(09月09日) 大佬,kib的页面可以分享下吗?谢谢
    zhangsha 发布于 1 年前(05月12日) 资料发给我下,谢谢纳米同志!!!!lyx895@qq.com
    李成才 发布于 1 年前(01月02日) 麻烦了,谢谢大佬
    纳米 发布于 1 年前(01月02日) 你好。是的,因为以前下载系统插件在一次升级后将所有的下载生成信息全弄丢了。所以不少文件无法下载。DN...
    浏览次数
    • Downloads - 183,777 views
    • 联系我 - 118,966 views
    • 迄今为止最全最深入的BIGIP-DNS/GTM原理及培训资料 - 116,516 views
    • Github - 103,665 views
    • F5常见log日志解释 - 79,774 views
    • 从传统ADC迈向CLOUD NATIVE ADC - 下载 - 74,627 views
    • Sniffer Pro 4 70 530抓包软件 中文版+视频教程 - 74,320 views
    • 迄今为止最全最深入的BIGIP-DNS/GTM原理及培训资料 - 67,770 views
    • 关于本站 - 60,915 views
    • 这篇文档您是否感兴趣 - 55,496 views
    链接表
    • F5SE创新
    • Jimmy Song‘s Blog
    • SDNlab
    • Service Mesh社区
    • 三斗室
    • 个人profile
    • 云原生社区

    COPYRIGHT © 2023 Cloud Native 应用交付. ALL RIGHTS RESERVED.

    Theme Kratos Made By Seaton Jiang

    京ICP备14048088号-1

    京公网安备 11010502041506号