User Tools

Site Tools


регистрация_событий_в_linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
регистрация_событий_в_linux [2026/08/02 10:10]
val [Настройка на обработку сообщений типа local0]
регистрация_событий_в_linux [2026/11/03 15:53] (current)
val [Форматы вывода]
Line 84: Line 84:
 Facility="​local0"​) Facility="​local0"​)
  
-#:msg, contains, "​adduser" ​ ~ +#:msg, contains, "​adduser" ​stop 
-#:msg, contains, "​edituser" ​ ~+#:msg, contains, "​edituser" ​stop
  
 #*.* @server.corpX.un:​8514 #*.* @server.corpX.un:​8514
Line 91: Line 91:
 </​code>​ </​code>​
  
-==== Изменение формата сообщений ==== +==== Журнал важных ​сообщений ====
- +
-Добавление уровня важности+
  
 <​code>​ <​code>​
 # cat /​etc/​rsyslog.d/​40-syslog-high.conf # cat /​etc/​rsyslog.d/​40-syslog-high.conf
 </​code><​code>​ </​code><​code>​
-template(name="​WithSeverity" type="​string"​ string="​%TIMESTAMP% %HOSTNAME% [%syslogseverity-text%] %syslogtag%%msg%\n"​)+template(name="​WithSeverityFacility" type="​string"​ string="​%TIMESTAMP% %HOSTNAME% [%syslogfacility-text%.%syslogseverity-text%] %syslogtag%%msg%\n"​)
  
-#​$ActionFileDefaultTemplate ​WithSeverity+#​$ActionFileDefaultTemplate ​WithSeverityFacility
  
-#*.* -/​var/​log/​syslog.high;​WithSeverity +#*.* -/​var/​log/​syslog.high;​WithSeverityFacility 
-*.warning -/​var/​log/​syslog.high;​WithSeverity+*.warning -/​var/​log/​syslog.high;​WithSeverityFacility 
 + 
 +#if (not ($msg contains "​PNP0A03"​) and 
 +#    not ($msg contains "​LPM"​) and 
 +#    not ($msg contains "​vmwgfx"​) and 
 +#    not ($msg contains "​ehci_hcd"​)) then { 
 +#    *.warning;​local3.none -/​var/​log/​syslog.high;​WithSeverityFacility 
 +#    local3.crit -/​var/​log/​syslog.high;​WithSeverityFacility 
 +#}
 </​code>​ </​code>​
   * [[#​Настройка на обработку сообщений типа local0]]   * [[#​Настройка на обработку сообщений типа local0]]
Line 138: Line 144:
 ==== Форматы вывода ==== ==== Форматы вывода ====
 <​code>​ <​code>​
 +# journalctl -S-1h
 +
 # journalctl -ra # journalctl -ra
  
регистрация_событий_в_linux.1785654637.txt.gz · Last modified: 2026/08/02 10:10 by val