Logging, Syslog and Log Anaylsys Forums
July 30, 2010, 09:43:51 pm
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
WIKI
BLOG
Help
Search
Recent Topics
GoogleTagged
Login
Register
Logging, Syslog and Log Anaylsys Forums
>
Forums
>
syslog-ng
>
$YEAR, $MONTH & $DAY in file source
Pages: [
1
]
« previous
next »
Print
Author
Topic: $YEAR, $MONTH & $DAY in file source (Read 638 times)
scusting
Newbie
Offline
Posts: 1
$YEAR, $MONTH & $DAY in file source
«
on:
February 23, 2010, 08:10:23 am »
Hi,
I'm trying to use syslog-ng to follow a file and syslog this data to a remote syslog server. I have my source defined as such:
source s_tail_radius {
file("/data/log/radius-$YEAR$MONTH$DAY" follow_freq(1) flags(no-parse));
};
However it doesnt seem to be using the date variables to find this file:
Feb 23 12:01:24 syslog-ng[19582]: Follow-mode file source not found, deferring open; filename='/data/log/radius-$YEAR$MONTH$DAY'
Is it possible to specify these variables in the source definition?
Thanks.
Jim.
Logged
Admin
Administrator
Newbie
Offline
Posts: 146
Re: $YEAR, $MONTH & $DAY in file source
«
Reply #1 on:
February 23, 2010, 08:19:46 am »
The $YEAR, $MONTH, $DAY, etc variables are populated with the their respective values from a log, and so are only valid in the context of a destination function. The only thing I can think to do is have radius log to a standard file, such as "/data/log/radius.log", then have the logs rotated as needed. That way, you can have syslog-ng read from /data/log/radius.log.
Logged
balabit
Newbie
Offline
Posts: 4
Re: $YEAR, $MONTH & $DAY in file source
«
Reply #2 on:
March 09, 2010, 07:14:43 am »
Hi, what you are looking for is using wildcards in the filename (
http://www.balabit.com/dl/html/syslog-ng-v3.0-guide-admin-en.html/ch03s03.html#configuring_sources_file
), but this feature is currently available only in the commercial syslog-ng Premium Edition.
Logged
Pages: [
1
]
Print
GoogleTagged:
file source
open source definition
syslog-ng variables source with
syslog-ng wildcard
file source not syslog-ng
source not syslog
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Forums
-----------------------------
=> Syslog & syslogd
=> syslog-ng
=> Log Data and Analysis
=> Windows Event Log
=> Web Server Logs
=> Security Event Management
=> General Discussion
===> Red Light District
Loading...