免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2209 | 回复: 2
打印 上一主题 下一主题

增加了个日志服务器,本机message怎么没日志输出 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-11-29 10:33 |只看该作者 |倒序浏览
本帖最后由 faith900 于 2010-11-29 11:10 编辑

在syslog.conf增加了个日志服务器
daemon.notice;auth.info                 @10.10.10.10
但是本机message都没数据生成了

syslog.conf
  1. root@app2 # more /etc/syslog.conf
  2. #ident  "@(#)syslog.conf        1.5     98/12/14 SMI"   /* SunOS 5.0 */
  3. #
  4. # Copyright (c) 1991-1998 by Sun Microsystems, Inc.
  5. # All rights reserved.
  6. #
  7. # syslog configuration file.
  8. #
  9. # This file is processed by m4 so be careful to quote (`') names
  10. # that match m4 reserved words.  Also, within ifdef's, arguments
  11. # containing commas must be quoted.
  12. #
  13. *.err;kern.notice;auth.notice                   /dev/sysmsg
  14. *.err;kern.debug;daemon.notice;mail.crit        /var/adm/messages

  15. *.alert;kern.err;daemon.err                     operator
  16. *.alert                                         root

  17. *.emerg                                         *
  18. auth.notice                                     /var/adm/authlog
  19. *.*     @10.154.32.179

  20. # if a non-loghost machine chooses to have authentication messages
  21. # sent to the loghost machine, un-comment out the following line:
  22. #auth.notice                    ifdef(`LOGHOST', /var/log/authlog, @loghost)

  23. mail.debug                      ifdef(`LOGHOST', /var/log/syslog, @loghost)

  24. #
  25. # non-loghost machines will use the following lines to cause "user"
  26. # log messages to be logged locally.
  27. #
  28. ifdef(`LOGHOST', ,
  29. user.err                                        @10.0.0.92
  30. auth.notice                                     /var/adm/authlog
  31. user.err                                        /dev/sysmsg
  32. user.err                                        /var/adm/messages
  33. user.alert                                      `root, operator'
  34. user.emerg                                      *
  35. )
  36. daemon.notice;auth.info                 @10.10.10.10
复制代码
root@app2 # tail -f /var/adm/messages
Nov 26 08:48:10 app2 syslogd: going down on signal 15
Nov 29 10:19:38 app2 syslogd: going down on signal 15
Nov 29 10:19:40 app2 syslogd: line 20: unknown priority name "*"

root@app2 # ps -ef|grep -i syslog
      root 12298 12049  0 10:37:35 pts/1    0:00 grep -i syslog
    root  9020     1  0 10:19:41 ?        0:00 /usr/sbin/syslogd
root@app2 #

论坛徽章:
0
2 [报告]
发表于 2010-11-29 10:35 |只看该作者
  1. root@app2 # syslogd -d
  2. main(1): Started at time Mon Nov 29 10:39:38 2010
  3. hnc_init(1): hostname cache configured 128 entry ttl:600
  4. getnets(1): found 1 addresses, they are: 0.0.0.0.2.2
  5. amiloghost(1): testing 10.0.0.74.2.2
  6. conf_init(1): I am loghost
  7. cfline(1): (*.err;kern.notice;auth.notice                       /dev/sysmsg)
  8. cfline(1): (*.err;kern.debug;daemon.notice;mail.crit    /var/adm/messages)
  9. cfline(1): (*.alert;kern.err;daemon.err                 operator)
  10. cfline(1): (*.alert                                             root)
  11. cfline(1): (*.emerg                                             *)
  12. cfline(1): (auth.notice                                 /var/adm/authlog)
  13. cfline(1): (*.* @10.154.32.179)
  14. logerror(1): syslogd: line 20: unknown priority name "*"
  15. logerror_to_console(1): syslogd: line 20: unknown priority name "*"
  16. cfline(1): (mail.debug                  /var/log/syslog)
  17. cfline(1): (daemon.notice;auth.info                     @10.10.10.10)

  18.   syslogd: version 1.99
  19.   Started: Mon Nov 29 10:39:38 2010
  20. Input message count: system 0, network 0
  21. # Outputs: 8

  22. ------------------------ priority = [file, facility] ------------------------

  23. 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2
  24. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
  25. --------------------------------------------------
  26. 5 3 3 3 5 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 X CONSOLE: /dev/sysmsg
  27. 7 3 2 5 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 X FILE: /var/adm/messages
  28. 3 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X USERS: operator
  29. 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X USERS: root
  30. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 X WALL:
  31. X X X X 5 X X X X X X X X X X X X X X X X X X X X FILE: /var/adm/authlog
  32. X X 7 X X X X X X X X X X X X X X X X X X X X X X FILE: /var/log/syslog
  33. X X X 5 6 X X X X X X X X X X X X X X X X X X X X FORW: 10.10.10.10
  34. Facilities:
  35.   [00] kern:   0
  36.   [01] user:   8
  37.   [02] mail:  16
  38.   [03] daemon:  24
  39.   [04] auth:  32
  40.   [05] security:  32
  41.   [06] mark: 192
  42.   [07] syslog:  40
  43.   [08] lpr:  48
  44.   [09] news:  56
  45.   [10] uucp:  64
  46.   [11] cron: 120
  47.   [12] local0: 128
  48.   [13] local1: 136
  49.   [14] local2: 144
  50.   [15] local3: 152
  51.   [16] local4: 160
  52.   [17] local5: 168
  53.   [18] local6: 176
  54.   [19] local7: 184

  55. Priorities:
  56.   [00] panic:   0
  57.   [01] emerg:   0
  58.   [02] alert:   1
  59.   [03] crit:   2
  60.   [04] err:   3
  61.   [05] error:   3
  62.   [06] warn:   4
  63.   [07] warning:   4
  64.   [08] notice:   5
  65.   [09] info:   6
  66.   [10] debug:   7
  67.   [11] none:  16



  68.                 Per File Statistics
  69. File                            Tot     Dups    Nofwd   Errs
  70. ----                            ---     ----    -----   ----
  71. /dev/sysmsg                     0       0       0       0
  72. /var/adm/messages               0       0       0       0
  73. operator                        0       0       0       0
  74. root                            0       0       0       0
  75. WALL                            0       0       0       0
  76. /var/adm/authlog                0       0       0       0
  77. /var/log/syslog                 0       0       0       0
  78. 10.10.10.10                   0       0       0       0


  79. logmsg(10): msg dispatcher started
  80. sys_poll(11): sys_thread started
  81. logerror(1): syslogd: syslogd pid 9020 already running. Cannot start another syslogd pid 12669
  82. root@app2 #
复制代码

论坛徽章:
0
3 [报告]
发表于 2010-11-29 11:51 |只看该作者
弄个不是notice和info的出来看看会不会有告警生成呢
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP