Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


admin_grundlagen:syslog

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
Nächste Überarbeitung Beide Seiten, nächste Überarbeitung
admin_grundlagen:syslog [2016/11/25 08:35]
stefan_miethke [Doku]
admin_grundlagen:syslog [2018/08/24 07:33]
stefan_miethke [Zielrechner:]
Zeile 6: Zeile 6:
  
 === Debian, CentOS === === Debian, CentOS ===
-''/​etc/​rsyslog.conf'':​ ( debian 5.0, centos 6.0 )+''/​etc/​rsyslog.conf'':​ ( debian 5.0, centos 6.0, ubuntu 18.04 )
 <​file>​ <​file>​
-  ​$ModLoad imudp +$ModLoad imudp 
-  $UDPServerRun 514 +$UDPServerRun 514 
-  local5.info ​    ​-/​var/​log/​beispiel+local5.info ​    ​-/​var/​log/​beispiel
 </​file>​ </​file>​
  
Zeile 42: Zeile 42:
  
 Syslog neu einlesen: Syslog neu einlesen:
-  ​/​etc/​init.d/​rsyslog restart+  ​service ​rsyslog restart
  
 Testen: Meldung abschicken: Testen: Meldung abschicken:
   logger -p local5.info "​Testmeldung"​   logger -p local5.info "​Testmeldung"​
 +  logger -t dbus[pid] "dbus fake message"​
 +  logger -p mail.alert "mail fake alert" ​ (landet in /​var/​log/​mail)
 +  logger -p authpriv.emerg "auth fake alert" (landet in /​var/​log/​secure)
 +  ​
 +Über'​s Netz direkt an syslog-Server:​
 +  logger -p local5.info -n notebook03 --tcp --port 514 "tcp test" ​
  
 ===== property based filter ===== ===== property based filter =====
Zeile 52: Zeile 58:
  
 :syslogtag, isequal, "​ingo:" ​         /​var/​log/​ingo.log :syslogtag, isequal, "​ingo:" ​         /​var/​log/​ingo.log
-& ~ # in der vorherigen Zeile ausgegebene Meldungen nicht erneut ausgeben+                                    ​~ # in der vorherigen Zeile ausgegebene Meldungen nicht erneut ausgeben
 :source , !isequal , "​notebook02" ​    ~ :source , !isequal , "​notebook02" ​    ~
 </​file>​ </​file>​
Zeile 214: Zeile 220:
  
 <​file>​ <​file>​
-emerg    Emergency condition, such as an imminent system crash, usually broadcast to all users +emerg    Emergency condition, such as an imminent system crash, usually broadcast to all users 
-alert    Condition that should be corrected immediately,​ such as a corrupted system database +alert    Condition that should be corrected immediately,​ such as a corrupted system database 
-crit     ​Critical condition, such as a hardware error +crit     ​Critical condition, such as a hardware error 
-err      Ordinary error +err      Ordinary error 
-warning ​ Warning +warning ​ Warning 
-notice ​  ​Condition that is not an error, but possibly should be handled in a special way +notice ​  ​Condition that is not an error, but possibly should be handled in a special way 
-info     ​Informational message +info     ​Informational message 
-debug    Messages that are used when debugging programs +debug    Messages that are used when debugging programs 
-none     ​Pseudo level used to specify not to log messages.+  none     ​Pseudo level used to specify not to log messages.
 </​file>​ </​file>​
 ''​debug,​ info, notice, warning, warn (same as warning), err, error (same as err), crit, alert, emerg, ​ panic  (same  as  emerg)''​ ''​debug,​ info, notice, warning, warn (same as warning), err, error (same as err), crit, alert, emerg, ​ panic  (same  as  emerg)''​
admin_grundlagen/syslog.txt · Zuletzt geändert: 2022/11/25 08:30 von ingo_wichmann