VRRP log messages going to different files
John Horne <[email protected]>
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Organization | Plymouth University |
| Message-ID | <1421002040.2135.19.camel@localhost> |
Hello,
Using keepalived 1.2.13 I see that there is a '-S' option for the main
keepalived process. The man page says:
Set syslog facility to LOG_LOCAL[0-7]. The default syslog
facility is LOG_DAEMON.
We typically set up the syslog 'daemon' facility (in /etc/rsyslog.conf)
to be written to the /var/log/daemon file. We do not specify the
keepalived '-S' option at all. However, with keepalived we are seeing
VRRP messages being written to the /var/log/messages file rather than
the daemon file.
Looking at the code in keepalived/vrrp/vrrp_daemon.c and
keepalived/check/check_daemon.c we can see (for example):
openlog(PROG_CHECK, LOG_PID | ((debug & 1) ? LOG_CONS : 0),
(log_facility==LOG_DAEMON) ? LOG_LOCAL2 : log_facility);
In vrrp_daemon.c the LOG_LOCAL1 facility is specified.
Since we do not specify LOCAL1 or LOCAL2 in /etc/rsyslog.conf, the
messages default to going to /var/log/messages.
Why are VRRP messages directed to LOCAL1 and check messages to LOCAL2
when the main process defaults to DAEMON? Surely all the messages should
go to whatever the '-S' option is set to (or defaults to)?
John.
--
----------------------------------------------------
John Horne Tel: +44 (0)1752 587287
Plymouth University, UK
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net