Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] syslog-ng: how to read the log files
Date: Mon, 23 Feb 2015 18:10:46
Message-Id: CADPrc82PvpXuLA62dna6+GvAcoD7WO8Nj_OQ+4MfdK5nXkHJ6w@mail.gmail.com
In Reply to: Re: [gentoo-user] syslog-ng: how to read the log files by covici@ccs.covici.com
1 On Mon, Feb 23, 2015 at 11:49 AM, <covici@××××××××××.com> wrote:
2 >
3 > Canek Peláez Valdés <caneko@×××××.com> wrote:
4 >
5 > > On Mon, Feb 23, 2015 at 3:41 AM, <covici@××××××××××.com> wrote:
6 > > >
7 > > > Marc Joliet <marcec@×××.de> wrote:
8 > > >
9 > > > > Am Mon, 23 Feb 2015 00:41:50 +0100
10 > > > > schrieb lee <lee@××××××××.de>:
11 > > > >
12 > > > > > Neil Bothwick <neil@××××××××××.uk> writes:
13 > > > > >
14 > > > > > > On Wed, 18 Feb 2015 21:49:54 +0100, lee wrote:
15 > > > > > >
16 > > > > > >> > I wonder if the OP is using systemd and trying to read the
17 > > journal
18 > > > > > >> > files?
19 > > > > > >>
20 > > > > > >> Nooo, I hate systemd ...
21 > > > > > >>
22 > > > > > >> What good are log files you can't read?
23 > > > > > >
24 > > > > > > You can't read syslog-ng log files without some reading
25 software,
26 > > usually
27 > > > > > > a combination of cat, grep and less. systemd does it all with
28 > > journalctl.
29 > > > > > >
30 > > > > > > There are good reasons to not use systemd, this isn't one of
31 them.
32 > > > > >
33 > > > > > To me it is one of the good reasons, and an important one. Plain
34 text
35 > > > > > can usually always be read without further ado, be it from rescue
36 > > > > > systems you booted or with software available on different
37 operating
38 > > > > > systems. It can be also be processed with scripts and sent as
39 email.
40 > > > > > You can probably even read it on your cell phone. You can still
41 read
42 > > > > > log files that were created 20 years ago when they are plain text.
43 > > > > >
44 > > > > > Can you do all that with the binary files created by systemd? I
45 can't
46 > > > > > even read them on a working system.
47 > > > >
48 > > > > What Canek and Rich already said is good, but I'll just add this:
49 it's
50 > > not like
51 > > > > you can't run a classic syslog implementation alongside the systemd
52 > > journal.
53 > > > > On my systems, by *default*, syslog-ng kept working as usual,
54 getting
55 > > the logs
56 > > > > from the systemd journal. If you want to go further, you can even
57 > > configure
58 > > > > the journal to not store logs permanently, so that you *only* end up
59 > > with
60 > > > > plain-text logs on your system (Duncan on gentoo-amd64 went this
61 way).
62 > > > >
63 > > > > So no, the format that the systemd journal uses is most decidedly
64 *not*
65 > > a reason
66 > > > > against using systemd.
67 > > > >
68 > > > > Personally, I'm probably going to uninstall syslog-ng, because
69 > > journalctl is
70 > > > > *such* a nice way to read logs, so why run something whose output
71 I'll
72 > > never
73 > > > > read again? I recommend reading
74 > > > > http://0pointer.net/blog/projects/journalctl.html for examples of
75 the
76 > > kind of
77 > > > > stuff you can do that would be cumbersome, if not *impossible* with
78 > > regular
79 > > > > syslog.
80 > > >
81 > > > Except that I get lots of messages about the system journal missing
82 > > > messages when forwarding to syslog, so how can I make sure this does
83 not
84 > > > happening?
85 > >
86 > > Could you please show those messages? systemd sends *everything* to the
87 > > journal, and then the journal (optionally) can send it too to a regular
88 > > syslog. In that sense, it's impossible for the journal to miss any
89 message.
90 > >
91 > > The only way in which the journal could miss messages is at very early
92 boot
93 > > stages; but with a proper initramfs (like the ones generated with
94 dracut),
95 > > even those get caught. You get to put an instance of systemd and the
96 > > journal inside the initramfs, and so it's available almost from the
97 > > beginning.
98 > >
99 > > And if you use gummiboot, then you can even log from the moment the UEFI
100 > > firmware comes to life.
101 >
102 > So, I get lots of messages in my regular syslog-ng /var/log/messages
103 > like the following:
104 > Feb 23 12:47:52 ccs.covici.com systemd-journal[715]: Forwarding to
105 > syslog missed 15 messages.
106 >
107 > So, I saw a post on Google to up the queue length, and I uped it to 200,
108 > but no joy, still get the messages like the one above.
109
110 Are you using the unit file provided by syslog-ng (systemd-delta doesn't
111 mention syslog)? Also, is /etc/systemd/system/syslog.service is a link
112 to /usr/lib/systemd/system/syslog-ng.service?
113
114 I do, and I don't get any of those messages. I use the default journal
115 configuration. According to [1], this should be fixed.
116
117 Regards.
118
119 https://github.com/balabit/syslog-ng/issues/314
120 --
121 Canek Peláez Valdés
122 Profesor de asignatura, Facultad de Ciencias
123 Universidad Nacional Autónoma de México

Replies

Subject Author
Re: [gentoo-user] syslog-ng: how to read the log files Marc Joliet <marcec@×××.de>
Re: [gentoo-user] syslog-ng: how to read the log files covici@××××××××××.com