Outils pour utilisateurs

Outils du site


linux:syslog-ng
no way to compare when less than two revisions

Différences

Ci-dessous, les différences entre deux révisions de la page.


linux:syslog-ng [25/11/2008 18:41] (Version actuelle) – créée daniel
Ligne 1: Ligne 1:
 +====== syslog-ng ======
 +J'utilise syslog-ng car je trouve la syntaxe plus simple. Par rapport à la config de base, je modifie (pour alléger syslog des messages du fw, de cron et du ftp)
 +<file>
 +# Ajouts
 +destination df_kern-info { file("/var/log/kern-info.log"); };
 +destination df_pureftp { file("/var/log/pureftp.log"); };
 +# modifs
 +filter f_syslog { not facility(auth, authpriv, cron, ftp)  
 +                and not (
 +                  level(info)
 +                  and facility(kern)
 +                )
 +                and not (  # seuls les transferts ont la facility ftp...
 +                  program("pure-ftpd")
 +                  or program("pure-ftpd-wrapper")
 +                )
 +; };
 +filter f_messages {
 +        level(info,notice,warn)
 +        and not facility(auth,authpriv,cron,daemon,mail,news)
 +        and not (level(info) and facility(kern));
 +};
  
 +filter f_pureftp { facility(ftp)
 +                or program("pure-ftpd")
 +                or program("pure-ftpd-wrapper")
 +; };
 +filter f_kern { facility(kern) and not level(info); };
 +# Pour les infos du fw
 +filter f_kern-info { 
 +        facility(kern)
 +        and level(info);
 +};
 +
 +log {
 +        source(s_all);   
 +        filter(f_kern-info);
 +        destination(df_kern-info);
 +};
 +# decommenté
 +log {
 +        source(s_all);
 +        filter(f_cron);
 +        destination(df_cron);
 +};
 +log {
 +        source(s_all);
 +        filter(f_pureftp);
 +        destination(df_pureftp);
 +};
 +</file>
 +Et si vous envoyez les logs drupal dans syslog (ici avec la facility "local3"), vous pouvez ajouter
 +<file>
 +destination df_local3_drupal { file("/var/log/drupal.log"); };
 +filter f_local3_drupal {facility(local3); };
 +log {
 +        source(s_all);
 +        filter(f_local3_drupal);
 +        destination(df_local3_drupal);
 +};
 +</file>
linux/syslog-ng.txt · Dernière modification : 25/11/2008 18:41 de daniel