1 |
Fekete Robert wrote: |
2 |
> You are right, the program-override option is missing from the |
3 |
> documentation of the file source, but it should work anyway. |
4 |
> We did a quick test and it was working on our Ubuntu machines (tested |
5 |
> with syslog-ng 3.02a), both on kernel messages and also on custom |
6 |
> files containing log messages. |
7 |
|
8 |
Well, I'm not sure where is the problem. I'm using syslog-ng-3.0.4 |
9 |
(the last stable version in portage). This is relevant part of my |
10 |
"new" /etc/syslog-ng.conf: |
11 |
==================== |
12 |
options { chain_hostnames(no); |
13 |
stats_freq(3600); |
14 |
ts_format(iso); |
15 |
flush_lines(1); |
16 |
log_fifo_size(250); }; |
17 |
|
18 |
source s_teamspeak { file("/var/log/teamspeak2-server/server.log" |
19 |
flags(store-legacy-msghdr) |
20 |
program_override("teamspeak: ") |
21 |
log_fetch_limit(100) |
22 |
flags(no-parse)); }; |
23 |
|
24 |
destination d_teamspeak { file("/var/log/ts2.log"); }; |
25 |
log { source(s_teamspeak); destination(d_teamspeak); }; |
26 |
========================== |
27 |
|
28 |
One line in source (/var/log/teamspeak-server/server.log): |
29 |
04-11-09 16:52:54,ALL,Info... (etc) |
30 |
|
31 |
Corresponding line in /var/log/ts2.log (that program_override() |
32 |
is simply missing): |
33 |
2009-11-04T16:52:54+00:00 talk 04-11-09 16:52:54,ALL,Info... |
34 |
|
35 |
For comparison, the same part of my syslog-ng v2.x config: |
36 |
========================== |
37 |
options { chain_hostnames(off); |
38 |
sync(0); |
39 |
stats(43200); |
40 |
ts_format(iso); }; |
41 |
|
42 |
source s_teamspeak2 { file("/var/log/teamspeak2-server/server.log" |
43 |
log_prefix("teamspeak2: ") |
44 |
follow_freq(1) |
45 |
flags(no-parse)); }; |
46 |
|
47 |
destination d_teamspeak { file("/var/log/ts2.log"); }; |
48 |
log { source(s_teamspeak); destination(d_teamspeak); }; |
49 |
=========================== |
50 |
|
51 |
And this is what I got in ts2.log with syslog-ng v2.x: |
52 |
|
53 |
2009-09-25T18:17:41+00:00 talk teamspeak2: 28-07-09 18:49:39,ALL,Info... |
54 |
|
55 |
You see the difference? |
56 |
syslog-ng 2.x: "iso-time hostname *log_prefix* message" |
57 |
syslog-ng 3.x: "iso-time hostname message" |
58 |
Where is program_override? |
59 |
|
60 |
v2/v3 config-files are now not absolutely the same but even when |
61 |
I made them identical (removed fifo_size, fetch_limit, flags, etc) |
62 |
I still had this problem. And I observed this strange behavior |
63 |
not only with this particular file() source, but with all file() |
64 |
sources. So what could be the reason? |
65 |
|
66 |
Jarry |
67 |
|
68 |
-- |
69 |
_______________________________________________________________ |
70 |
This mailbox accepts e-mails only from selected mailing-lists! |
71 |
Everything else is considered to be spam and therefore deleted. |