From: Dmitry Lebkov <dima@sakhalin.ru>
To: ALT Linux Community <community@lists.altlinux.org>
Subject: Re: [Comm] Внешний сислог - в отдельный файл
Date: Sun, 03 Sep 2006 01:37:12 +1100
Message-ID: <44F99718.5030104@sakhalin.ru> (raw)
In-Reply-To: <edbrcn$ogp$1@sea.gmane.org>
Вадим Илларионов wrote:
> Sergey wrote:
>
>> On Saturday 02 September 2006 09:58, Вадим Илларионов wrote:
>>
>>> Настроил на WiFi AP отсылку сислога на сервер.
>>> На сервере включил приём сислогов с этой АР.
>>> Не могу сообразить, как при получении отсеивать их в отдельный файл,
>>> например в /var/log/wifi
>> поменять syslog на syslog-ng для начала, видимо.
>
> Поставил. Достаточно ли следующих строчек в /etc/syslog-ng.conf для того,
> чтобы оно заработало:
>
> source net { udp(); };
> destination wifi { file("/var/log/remote/wifi.log"); };
> filter wifi { host(wifi); };
А хост в сислог прилетает как 'wifi' или таки как aaa.bbb.ccc.ddd?
Если я правильно помню, по-умолчанию syslog-ng не резолвит адреса
хостов в имена. У меня вполне успешно работают конструкции типа:
source remote { udp(); };
filter r_hosts_all {
host("192\.168\.21\.1$") or
host("192\.168\.21\.2$") or
host("192\.168\.21\.3$") or
host("192\.168\.21\.4$") or
host("192\.168\.21\.5$"); };
destination hosts_all { file("/var/log/remote/hosts/all-$YEAR$MONTH$DAY" group("logs") perm(0640) );
log { source(remote); filter(r_hosts_all); destination(hosts_all); };
man syslog-ng.conf и cat /usr/share/doc/syslog-ng-1.6.2/syslog-ng.txt
--
WBR, Dmitry Lebkov
next prev parent reply other threads:[~2006-09-02 14:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-02 4:58 Вадим Илларионов
2006-09-02 8:59 ` Sergey
2006-09-02 11:53 ` Вадим Илларионов
2006-09-02 11:59 ` Вадим Илларионов
2006-09-04 10:49 ` Sergey
2006-09-02 14:37 ` Dmitry Lebkov [this message]
2006-09-02 16:23 ` Вадим Илларионов
2006-09-03 6:25 ` Dmitry Lebkov
2006-09-03 23:28 ` Вадим Илларионов
2006-09-04 0:09 ` Dmitry Lebkov
2006-09-04 0:25 ` Вадим Илларионов
2006-09-04 9:54 ` Dmitry Lebkov
2006-09-04 10:09 ` Sergey Vlasov
2006-09-04 11:12 ` Dmitry Lebkov
2006-09-05 13:35 ` Вадим Илларионов
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44F99718.5030104@sakhalin.ru \
--to=dima@sakhalin.ru \
--cc=community@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git