meta data for this page
  •  

Differences

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

Link to this comparison view

linux:sw:rsyslog [2023/02/17 18:46] – created niziaklinux:sw:rsyslog [2023/09/14 09:54] (current) niziak
Line 13: Line 13:
  $template RemoteLogs,"/var/log/devices/%HOSTNAME%.log"   $template RemoteLogs,"/var/log/devices/%HOSTNAME%.log" 
  *.*  ?RemoteLogs  *.*  ?RemoteLogs
 +}
 +</code>
 +
 +==== dump vars rule ====
 +<code>
 +$template DUMP_ALL_VAR,"/rsyslog/dump_hostname=%HOSTNAME%,fromhost=%FROMHOST%,fromhost-ip=%FROMHOST-IP%,syslogtag=%SYSLOGTAG%,programname=%PROGRAMNAME%,app-name=%APP-NAME%"
 +*.* ?DUMP_ALL_VAR
 +</code>
 +
 +==== rule for TP-Link switch ====
 +
 +<code>
 +$template TPLinkSwitch,"/rsyslog/%FROMHOST%/syslog.log"
 +if ($msg contains "T2600G-28TS") then {
 +    ?TPLinkSwitch
 +    stop
 } }
 </code> </code>