keepalived的log日志设置

修改:/etc/sysconfig/keepalived,然后用service来启动。


  1. [root@LVS02 ~]# cat /etc/sysconfig/keepalived
  2. # Options for keepalived. See `keepalived --help' output and keepalived(8) and
  3. # keepalived.conf(5) man pages for a list of all options. Here are the most
  4. # common ones :
  5. #
  6. # --vrrp -P Only run with VRRP subsystem.
  7. # --check -C Only run with Health-checker subsystem.
  8. # --dont-release-vrrp -V Dont remove VRRP VIPs & VROUTEs on daemon stop.
  9. # --dont-release-ipvs -I Dont remove IPVS topology on daemon stop.
  10. # --dump-conf -d Dump the configuration data.
  11. # --log-detail -D Detailed log messages.
  12. # --log-facility -S 0-7 Set local syslog facility (default=LOG_DAEMON)
  13. #
  14. KEEPALIVED_OPTIONS="-D -d -S 0"
  15.  
  16. [root@LVS02 ~]# service keepalived start

最后设置syslog,修改/etc/syslog.conf.


  1. root@LVS02 ~]# cat /etc/syslog.conf
  2. # Log all kernel messages to the console.
  3. # Logging much else clutters up the screen.
  4. #kern.* /dev/console
  5. # Log anything (except mail) of level info or higher.
  6. # Don't log private authentication messages!
  7. *.info;mail.none;authpriv.none;cron.none /var/log/messages
  8. # The authpriv file has restricted access.
  9. authpriv.* /var/log/secure
  10. # Log all the mail messages in one place.
  11. mail.* -/var/log/maillog
  12. # Log cron stuff
  13. cron.* /var/log/cron
  14. # Everybody gets emergency messages
  15. *.emerg *
  16. # Save news errors of level crit and higher in a special file.
  17. uucp,news.crit /var/log/spooler
  18. # Save boot messages also to boot.log
  19. local7.* /var/log/boot.log
  20. # keepalived -S 0
  21. local0.* /var/log/keepalived.log

重启syslog,设置完成。

# /etc/init.d/syslog restart










本文转自 kuchuli 51CTO博客,原文链接:http://blog.51cto.com/lgdvsehome/899275,如需转载请自行联系原作者
上一篇:Twitter又有高管辞职 这次分别是财务与视频业务副总裁


下一篇:【产品动态】云存储11月月刊