From: Dmitry Lebkov <dima@sakhalin.ru> To: ALT Linux Community <community@lists.altlinux.org> Subject: Re: [Comm] Внешний сислог - в отдельный файл Date: Sun, 03 Sep 2006 17:25:25 +1100 Message-ID: <44FA7555.5060509@sakhalin.ru> (raw) In-Reply-To: <edcb5a$46b$1@sea.gmane.org> Вадим Илларионов пишет: > Dmitry Lebkov wrote: > >> А хост в сислог прилетает как 'wifi' > Именно. > >> или таки как aaa.bbb.ccc.ddd? > Нет. Очстранно, т.к. в конфиге "из коробки" у syslog-ng написано буквально следующее: options { sync (0); time_reopen (10); log_fifo_size (1000); long_hostnames (off); use_dns (no); use_fqdn (no); create_dirs (no); keep_hostname (yes); }; И у меня в логах с удаленных хостов таки пишется ip-адрес хоста, с которого прилетел "лог": Jul 29 10:06:55 192.168.21.5 63: Jul 29 10:06:54.774 SKHD: %SONET-4-ALARM: ATM0/0/1: SLOS >> Если я правильно помню, по-умолчанию 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); }; > Громоздковато, да и одна открывающая скобочка фигурненькая куда-то > потерялась. Скобка потерялась при копировании. Вот так это должно быть. destination hosts_all { file("...." 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-03 6:25 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 2006-09-02 16:23 ` Вадим Илларионов 2006-09-03 6:25 ` Dmitry Lebkov [this message] 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=44FA7555.5060509@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