syslog.conf

SYSLOG.CONF(5)            Linux System Administration           SYSLOG.CONF(5)



åå
       syslog.conf - syslkogd(8) ã®è¨å®ãã¡ã¤ã«

説æ
       syslog.conf 㯠UNIX ã©ã¤ã¯ãªã·ã¹ãã ã§ãã®ã·ã¹ãã ã¡ãã»ã¼ã¸ãè¨é²ãã
       syslogd(8) ã®ããã®è¨å®ãã¡ã¤ã«ã§ããããã®ãã¡ã¤ã«ã¯è¨é²ã®ã«ã¼ã«ãè¦å®ãããåºæã®
       æ©è½ã«ã¤ãã¦ã¯ sysklogd(8) ã®ããã¥ã¢ã«ãã¼ã¸ãåç§ãããã¨ã

       ã«ã¼ã«ã¯ selector ãã£ã¼ã«ã㨠action
       ãã£ã¼ã«ãã®äºã¤ã®ãã£ã¼ã«ãã§æ§æããããããã®äºã¤ã®ãã£ã¼ã«ãã¯
       ä¸ã¤ä»¥ä¸ã®ç©ºç½æåã TAB æåã§åºåããããselector ãã£ã¼ã«ãã¯æå®ã ãã action
       ãé©ç¨ãã facility 㨠priority ã®ãã¿ã¼ã³ãè¦å®ããã

       ã·ã£ã¼ãè¨å·(``#'')ã§åã¾ãè¡ã¨ç©ºè¡ã¯ç¡è¦ããã


SELECTORS
       selector ãã£ã¼ã«ãã¯ããã«ããªãªã(``.'')ã§åºåããã facility 㨠priority
       ã®äºã¤ã®é¨åã§æ§æããã ã©ã¡ãã®é¨åãæåã®å¤§æåå°æåã¯åºå¥ããªããã¾ããæ°åãç¨ãããã¨ã
       å¯è½ã§ããããããã¯ä½¿ç¨ããªãæ¹ãããããã®ä½¿ç¨æã«ã¯è¦åããªãããã facility ã¨
       priority ã«ã¤ãã¦ã¯ syslog(3) ã«è¨è¿°ããã¦ããã以ä¸ã«è¨è¿°ããå種ã®ååã¯
       /usr/include/syslog.h ã«ããã LOG_-values ã®åãååã®ãã®ã«å¯¾å¿ããã

       facility ã¯æ¬¡ã®ãã¼ã¯ã¼ãã®ããããã§ãã: authã authprivã cronã daemonã kernã
       lprã mailã markã newsã security (auth ã¨åã)ã syslogã userã uucpã
       local0ããlocal7ã ãã®ãã¡ security ã¯ä»å¾ã¯å©ç¨ããã¹ãã§ãªããã¾ãã mark
       ã¯åé¨å©ç¨ã®ããã®ãã®ãªã®ã§ãã¢ããªã±ã¼ã·ã§ã³ã¬ãã«ã§ç¨ããã¹ãã§ã¯ãªãã
       ãã ãå©ç¨ã§ããªãããã§ã¯ãªãã facility
       ã¯ã¡ãã»ã¼ã¸ãçæãããµãã·ã¹ãã ãè¦å®ãããããªãã¡(ä¾ãã°)å¨ã¦ã®ã¡ ã¤ã«ããã°ã©ã ã¯
       syslog ãç¨ãã¦ãã°ãè¨é²ããå ´å㯠mail facility (LOG_MAIL) ãç¨ããã

       priority ã¯ä»¥ä¸ã®ãã¼ã¯ã¼ãã®ããããã§ãã(æé ): debug, info, notice,
       warning, warn ( warning ã¨åã), err, error (err ã¨åã), crit, alert,
       emerg, panic (emergã¨åã).  ãã®ãã¡ãã¼ã¯ã¼ã errorãwarnãpanic
       ã«ã¤ãã¦ã¯ãåçã®ãã®ãããã®ã§ä»å¾ã¯å©ç¨ããã¹ãã§ãªãã priority
       ã¯ã¡ãã»ã¼ã¸ã®éè¦æ§ãå®ç¾©ããã

       ãªãªã¸ãã«ã® BSD ã·ã¹ãã ã® syslogd ã®åä½ã¯ãæ示ããã priority ã¨ãã
       ãããé ä½ã®é«ãå¨ã¦ã®ã¡ãã»ã¼ã¸ãä¸ãããã action ã«æ²¿ã£ã¦è¨é²ãããã
       ã¨ãããã®ã§ããããã® syslogd(8) ãããã¨åãåä½ã§ããããããã¤ãã®æ¡å¼µæ©è½ãæããã

       ä¸è¿°ã®ååã«å ãã syslogd(8) ã¯ä»¥ä¸ã®æ¡å¼µã«ã¤ãã¦ãç解ãã:
       ã¢ã¹ã¿ãªã¹ã¯(``*'')ã¯ããããç¨ãããã¦ããå ´æ(ããªãã¡ããªãªãã®åã
       å¾ãã)ã«å¿ãã¦å¨ã¦ã® facility ãã¾ãã¯å¨ã¦ã® priority ã表ããããã¼ ã¯ã¼ã none
       ãä¸ãããã facility ã«ã¤ã㦠priority ã¯ãªããã¨ã示ãã

       ã³ã³ã(``,'')ãç¨ãã¦ãåã priority ã示ãä¸æã®ãªãã«è¤æ°ã® facility
       ãæå®ãããã¨ãå¯è½ã§ãããfacility ã®åæ°ã«å¶éã¯ãªãããã ããã®ã
       ããªè¨è¿°ãå¯è½ãªã®ã¯ facility ã«ã¤ãã¦ã®ã¿ã§ã priority ã«ã¤ãã¦ã®ãã®
       ãããªè¨è¿°ã¯ç¡è¦ããã®ã§æ³¨æãããã¨ã

       ã»ãã³ãã³(``;'')ãåºåãã«ç¨ãã¦è¤æ°ã® selector ã«ã¤ãã¦åä¸ã® action
       ãæå®ãããã¨ãã§ããã selector ãã£ã¼ã«ãã® selector
       ã¯åè¡ãããã®ãä¸æ¸ããã¦ãã¾ããã¨ã«æ³¨æããã ã¨ããã®åä½ãç¨ãã¦ç¹å®ã® priority
       ãé¤å¤ãããã¨ãå¯è½ã§ããã

       ãã® syslogd(8) ã¯ãªãªã¸ãã«ã® BSD
       ã®ã½ã¼ã¹ãæ¡å¼µããæ§æãæã£ã¦ãã¦ãããç´è¦³çãªå©
       ç¨ãå¯è½ã«ãã¦ãããã¤ã³ã¼ã«è¨å·(``='')ã priority ã«æ¥é ããã¨ããã® priority
       ã®ãã®ã®ã¿ãè¨é²ããããã«ãããã¨ãã§ãããã¨ã¯ã¹ã¯ã©ã¡ã¼ã·ã§
       ã³ãã¼ã¯(``!'')ãæ¥é ããã¨ãã® priority ã¨ãããããé«ã priority ã®
       ãã®ã®ãã¹ã¦ãç¡è¦ããããã¨ãã§ãã(ã¤ã³ã¼ã«è¨å·ã¨ã¨ã¯ã¹ã¯ã©ã¡ã¼ã·ã§
       ã³ãã¼ã¯ã®ä¸¡æ¹ãåæã«æå®ãããã¨ã¯å¯è½ã§ãã)ããã®æ¡å¼µã®ä¸¡æ¹ãåæ
       ã«ç¨ããå ´åãã¤ã³ã¼ã«è¨å·ã®åã«ã¨ã¯ã¹ã¯ã©ã¡ã¼ã·ã§ã³ãã¼ã¯ãç½®ããã¨ã§ ãã®
       priority ã®ã¿ç¡è¦ããã


ACTIONS
       ã«ã¼ã«ã® action ãã£ã¼ã«ãã«ã¯ ``logfile'' ãæ示ããã``logfile'' 㯠å®å‐
       ãããã¡ã¤ã«ã§ãªãã¦ããã¾ããªãã syslogd(8) ã¯ä»¥ä¸ã®åä½ãç¨æãã¦ããã


   é常ã®ãã¡ã¤ã«
       ã¡ãã»ã¼ã¸ã¯ãã®ãã¡ã¤ã«ã«è¨é²ãããããã¡ã¤ã«å㯠``/'' ã§åã¾ããã«
       ãã¹ã§æå®ãããã¨ã

       ãã¤ãã¹è¨å· ``-'' ãæ¥é ããã¨ãè¨é²ã®éã®ãã¡ã¤ã«ã·ã¹ãã ãããã¡ã®
       ãã©ãã·ã¥åä½ãæå¶ããããããç¨ããã¨ãæ¸ãè¾¼ã¿åä½ã®ç´å¾ã«ã·ã¹ãã
       ã«é害ãçºå£°ããå ´åãæå ±ã失ãªãå¯è½æ§ããããã¨ã«æ³¨æãããã¨ããã
       ããªãããã®æ©è½ã¯ç¹ã«é¨ããããã®ã³ã°ããããã°ã©ã ãåä½ãããéã®ã
       ãããã®æ§è½æ¹åã«ã¯å½¹ã«ç«ã¤ã


   ååä»ããã¤ã
       ãã® syslogd(8) ã¯ååä»ããã¤ã(FIFO)ã¸ã®åºåæ©è½ãåãã¦ããããã¤ãè¨å·(``|'')ãæ¥
       é ãããã¡ã¤ã«åã«ãããã¡ãã»ã¼ã¸ã®åºååã¨ãã¦ãFIFO ã¾ãã¯ååä»ã
       ãã¤ããç¨ãããããããã¯ãããã°ä½æ¥ã«å½¹ç«ã¤ãFIFO 㯠syslogd(8) ã®ã¹ã¿ã¼ãã«åç«ã¡ã
       mkfifo(1) ã³ãã³ãã«ããçæãããå¿è¦ããããã¨ã«æ³¨æãããã¨ã


   ã¿ã¼ããã«ã¨ã³ã³ã½ã¼ã«
       ãã¡ã¤ã«ã¨ã㦠tty ãæ示ããå ´åã¯ãtty ç¨ã®å¦çããªãããã /dev/console ãåãã


   ãªã¢ã¼ãã³ã³ãã¥ã¼ã¿
       ãã® syslogd(8) ã¯å®å¨ãªãªã¢ã¼ããã®ã³ã°æ©è½ãæä¾ãããããªãã¡ã¡ãã»ã¼ã¸ã
       syslogd(8) ã®åä½ãããªã¢ã¼ãã®ãã¹ãã«éä¿¡ãããã¨ãã§ããã¾ããªã¢ã¼ãã®ãã¹ãã
       ãã®ã¡ãã»ã¼ã¸ãåä¿¡ãããã¨ãã§ããããªã¢ã¼ãã®ãã¹ãã¯ã¡ãã»ã¼ã¸ãã
       ã以ä¸ä»ã®ãã¹ãã¸è»¢éãããã¨ã¯ã§ããããã®æ©æ¢°ã«ãã¼ã«ã«ã«è¨é²ããã
       ä»ã®ãã¹ãã¸ã¡ãã»ã¼ã¸ãéä¿¡ããã«ã¯ã¢ãããã¼ã¯(``@'')ããã®ãã¹ãå ã«æ¥é ããã

       ãã®æ©è½ãç¨ããã¨ãä»ã®å¨ã¦ã®ã³ã³ãã¥ã¼ã¿ã«ãªã¢ã¼ãã«è¨é²ããããã¨ã§ã ãã¹ã¦ã®
       syslog ã¡ãã»ã¼ã¸ãä¸å°ã®ãã¹ãã§å¶å¾¡ãããã¨ãã§ããããã㯠管çä¸ã®å°é£ã解æ¶ããã


   ã¦ã¼ã¶åã®ãªã¹ã
       é常ãç¹ã«éè¦ãªã¡ãã»ã¼ã¸ã¯ãã®ã³ã³ãã¥ã¼ã¿ã® ``root'' ã«ãå®ã¦ããã
       ãã®ã§ãããlogin ãã¦ããã¨ãã«ã¡ãã»ã¼ã¸ãåãã¨ãã¹ãã¦ã¼ã¶ã®ãªã¹ã
       ãæ示ãããã¨ãã§ãããã³ã³ã(``,'')ã§åºåã£ã¦è¤æ°ã®ã¦ã¼ã¶ãæå®ãã
       ãã¨ãã§ãããã¡ã¤ã«ã§éããã¨æã£ã¦ã¯ãããªããããã§ã¯æéãã«ãªã£ã¦ ãã¾ããããããªãã


   ãã°ã¤ã³ãã¦ãã誰ã§ã
       ã·ã¹ãã ã«ãªã«ãå·åãæªããã¨ãçºçãããã¨ãéç¥ããããã«ãç·æ¥ã®ã¡ã
       ã»ã¼ã¸ã¯ãã°ãã°ãã®æãªã³ã©ã¤ã³ã«ãªã£ã¦ããå¨ã¦ã®ã¦ã¼ã¶ã«éç¥ãããã ãã®
       wall(1)çæ©è½ ãå©ç¨ããããã«ã¯ã¢ã¹ã¿ãªã¹ã¯(``*'')ãç¨ããã


ä¾
       ããã«å®å¨ãã site ã®å®éã®è¨å®ä¾ã®ä¸é¨ãç¨ããããã¤ãã®è¨å®ä¾ãæã
       ãããã¾ãããã°ããã¶ããããã§è¨å®ä¸ã®çåã¯ãã¹ã¦è§£æ¶ã§ããã¨æããã ãªã«ããã£ããçè( Joey
       )å®ã¦ã«é£çµ¡ããã ãããã


              # å±æ©çç¶æ³ã /var/adm/critical ã«ä¿åããã
              #
              *.=crit;kern.none            /var/adm/critical

       priority ã crit ããã以ä¸ã®ã«ã¼ãã«ã¡ãã»ã¼ã¸ãé¤ããã¹ã¦ã®ã¡ãã»ã¼ã¸ããã¡ã¤ã«
       /var/adm/critical ã«ä¿åããã


              # ã«ã¼ãã«ã¡ãã»ã¼ã¸ã¯ /var/adm/kernel ã«
              # ä¿åããããã« critical 以ä¸ã®éè¦åº¦ã®
              # ã¡ãã»ã¼ã¸ã¯ä»ã®ãã¹ãã¸éä¿¡ãã³ã³ã½ã¼
              # ã«ã«ã表示ããã
              #
              kern.*                       /var/adm/kernel
              kern.crit                    @finlandia
              kern.crit                    /dev/console
              kern.info;kern.!err          /var/adm/kernel-info

       ä¸çªç®ã®ã«ã¼ã«ã«ãããfacility ã kern ã®ã¡ãã»ã¼ã¸ã¯ãã¡ã¤ã« /var/adm/kernel
       ã«è¨é²ãããã

       äºçªç®ã®æã«ããã priority ã crit ããããããé«ãå¨ã¦ã®ã¡ãã»ã¼ã¸ã¯ãªã¢ã¼ãã®ãã¹ã
       finlandia ã¸éä¿¡ã ãããããã¯ããã¹ãã®é害ãçãã¦ä¿åãããã¡ãã»ã¼ã¸ãèªã¿ã ããã¨ã
       ã§ããªããªããããªå復ä¸è½ã¨ã©ã¼ããã£ã¹ã¯è£ç½®ã«çºçããéã«æå¹ã§ããã
       ãªã¢ã¼ãã®ãã¹ãã«æ®ãããã¡ãã»ã¼ã¸ã§é害ã®åå 調æ»ã«åãæããã¨ã㧠ããã

       ä¸çªç®ã®ã«ã¼ã«ã¯ãã®ã³ã³ãã¥ã¼ã¿ã§ä½æ¥ãã¦ãã誰ãããã®ã¡ãã»ã¼ã¸ãå¾
       ããã¨ãã§ããããã«ãå®éã®ã³ã³ã½ã¼ã«ã«è¡¨ç¤ºããã

       åè¡ç®ã¯ãsyslogd ã«priorityã info ãã warning ã®ã«ã¼ãã«ã¡ãã»ã¼ã¸ããã¡ã¤ã«
       /var/adm/kernel-info ã«ä¿åããããæ示ããã err ãããé«ã priority
       ãæã¤ãã®ã¯é¤å¤ãããã


              # tcp wrapper 㯠mail.info ã§ãã®ã³ã°ããã
              # ãã¹ã¦ã®æ¥ç¶ã tty12 ã«è¡¨ç¤ºããã
              #
              mail.=info                   /dev/tty12

       ãã®ä¾ã¯ mail.info (ã½ã¼ã¹ã³ã¼ãä¸ã§ã¯ LOG_MAIL | LOG_INFO)
       ãç¨ããå¨ã¦ã®ã¡ãã»ã¼ã¸ã 第 12 ã³ã³ã½ã¼ã« /dev/tty12 ã«è¡¨ç¤ºãããä¾ãã°
       tcpwrapper tcpd(8) ã¯ãã®è¨å®ãæ¢å®å¤ã¨ãã¦ç¨ãã¦ããã


              # ã¡ã¤ã«é¢ä¿ã¯ä¸ã¤ã®ãã¡ã¤ã«ã¸ä¿åããã
              #
              mail.*;mail.!=info           /var/adm/mail

       ãã®ãã¿ã¼ã³ã¯ facility ã mail ã®å¨ã¦ã®ã¡ãã»ã¼ã¸ãã priority ã info
       ã§ãããã®ãé¤ããã¨ã示ãããããã®ã¡ãã»ã¼ã¸ã¯ãã¡ã¤ã« /var/adm/mail.  ã«è¨é²ããã


              # mail.info 㨠news.info ã /var/adm/info ãè¨é²ããã
              #
              mail,news.=info              /var/adm/info

       ãã®ä¾ã¯ mail.info 㨠news.info ã®ä¸¡æ¹ã®å¨ã¦ã®ã¡ãã»ã¼ã¸ãæãåºãããã¡ã¤ã«
       /var/adm/info ã«ä¿åããã


              # info 㨠notice 㯠/var/log/messages ã¸è¨é²ããã
              #
              *.=info;*.=notice;mail.none  /var/log/messages

       ãã®ä¾ã¯ syslogd ã«
        facility ã mail ã§ããã®ãã®ãé¤ãä»ã® å¨ã¦ info 㨠notice ã®ä¸¡æ¹ã®
       priority ã®å¨ã¦ã®ã¡ãã»ã¼ã¸ããã¡ã¤ã« /var/log/messages ã«ä¿åããããæ示ããã


              # info ã¡ãã»ã¼ã¸ã¯ /var/log/messages ã¸è¨é²ããã
              #
              *.=info;mail,news.none       /var/log/messages

       ãã®æ示ã«ãã syslogd 㯠priority info ã®å¨ã¦ã®ã¡ãã»ã¼ã¸ããã¡ã¤ã«
       /var/log/messages ã«è¨é²ããããã ã facility ã mail 㨠news
       ã®ä¸¡æ¹ã®ã¡ãã»ã¼ã¸ã¯ä¿åããªãã


              # ç·æ¥ã¡ãã»ã¼ã¸ã wall ã§è¡¨ç¤ºããã
              #
              *.=emerg                     *

       ãã®ã«ã¼ã«ã¯ syslogd ã«å¨ã¦ã®ç·æ¥ã®ã¡ãã»ã¼ã¸ããã®æã‐
       ã°ã¤ã³ãã¦ããå¨ã¦ã®ã¦ã¼ã¶ã«ä¼ããã ãæ示ãããããã wall action ã§ããã


              # priority ã alert ã®ã¡ãã»ã¼ã¸ã¯ç®¡çæå½ã¸
              # éãã
              *.alert                      root,joey

       ãã®ã«ã¼ã«ã¯ priority ã alert
       ããããããé«ãå¨ã¦ã®ã¡ãã»ã¼ã¸ãæä½èãããªãã¡ã¦ã¼ã¶å ``root'' 㨠``joey'' ãã‐
       ã°ã¤ã³ãã¦ããã°ãã®ç«¯æ«ã«è¡¨ç¤ºããã


              *.*                          @finlandia

       ãã®ã«ã¼ã«ã¯å¨ã¦ã®ã¡ãã»ã¼ã¸ã finlandia ã¨å¼ã°ãããªã¢ã¼ãã®ãã¹ãã«
       転éãããããã¯ç¹ã«ä¸ç¾¤ã®ã³ã³ãã¥ã¼ã¿ã®å¨ã¦ã® syslog ã¡ãã»ã¼ã¸ãä¸å°
       ã®ã³ã³ãã¥ã¼ã¿ã«ä¿åããã®ã«å½¹ã«ç«ã¤ã


è¨å®ãã¡ã¤ã«ææ³ã®ç¸éç¹
       syslogd ã®è¨å®ã¯ ãªãªã¸ãã«ã® BSD ã½ã¼ã¹ã«ãããã®ã¨ã¯å°ãç°ãªãææ³ã使ç¨ããã
       åãã¯ãæ示ããã priority ã¨ãããããé«ã priority ã®å¨ã¦ã®ã¡ãã»ã¼ã¸ã ã‐
       ã°ãã¡ã¤ã«ã«è¨é²ããã¦ããããã® syslogd ã«ã¯ãããæè»ã§ç´è¦³çã«ããããããè¨‐
       å®ãå¯è½ã¨ãªãããã«ä¿®é£¾å ``=''ã ``!''ã``-''ã追å ããã¦ããã

       ãªãªã¸ãã«ã® BSD ã® syslogd ã§ã¯ selector ãã£ã¼ã«ã㨠action
       ãã£ã¼ã«ãã®åºåãã®æåã¨ãã¦ç©ºç½æåãå©ç¨ãããã¨ã¯ã§ããªã(TAB æ å‐
       ã§ãªããã°ãªããªã)ã


ãã¡ã¤ã«
       /etc/syslog.conf
              syslogd ã®è¨å®ãã¡ã¤ã«

ãã°
       è¤æ°ã® selector ãæ示ããã¨ãã°ãã°ç´è¦³çã§ãªããªããä¾ãã°ã
       ``mail.crit,*.err'' 㯠facility ã ``mail'' ã®ã¡ãã»ã¼ã¸ã®ãã¡ ``crit'' ãã
       é«ã priority ãã§ã¯ãªãã¦``err'' ãããé«ã priority ãæ示ãã¦ãããã¨ã« ãªãã

é¢é£é ç®
       sysklogd(8), klogd(8), logger(1), syslog(2), syslog(3)

èè
       syslogd 㯠Greg Wettstein(greg@wind.rmcc.com) ã BSD ã®ã½ã¼ã¹ã³ã¼ããã
       Linux ã§åä½ããããã«ç§»æ¤ããMatin Schulze (joey@linux.de) ãããã¤ãã®ãã°
       ãã£ãã¯ã¹ã¨æ°ããæ©è½ã®è¿½å ãããã



Version 1.3                    24 November 1995                 SYSLOG.CONF(5)