informatique:linux:syslog
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
informatique:linux:syslog [2016/12/30 07:21] – [Syslog centralisé] pteu | informatique:linux:syslog [2017/01/02 14:39] – [Syslog centralisé] exemples pteu | ||
---|---|---|---|
Line 92: | Line 92: | ||
</ | </ | ||
+ | === Exemples de filtres === | ||
+ | |||
+ | <code bash> | ||
+ | # compare-operation : | ||
+ | # | ||
+ | # property-based filter : | ||
+ | # msg | hostname | programname | etc... | ||
+ | # cible : | ||
+ | # | ||
+ | |||
+ | # | ||
+ | # notation abrégée | ||
+ | # | ||
+ | :msg, contains, " | ||
+ | & ~ | ||
+ | :msg, regex, "^\[ *[0-9]*\.[0-9]*\] iptables" | ||
+ | & ~ | ||
+ | |||
+ | # | ||
+ | # notation plus verbeuse (avec un " | ||
+ | # | ||
+ | if $msg regex '^\[ *[0-9]*\.[0-9]*\] iptables' | ||
+ | & ~ | ||
+ | |||
+ | # | ||
+ | # utilisation d'un template | ||
+ | # | ||
+ | # création du template " | ||
+ | $template OpenVPN,"/ | ||
+ | # on y tansfère tous les messages issus des processus dont le nom commence par " | ||
+ | : | ||
+ | # puis on arrête le traitement de ces messages pour éviter les doublons | ||
+ | : | ||
+ | </ | ||
==== WRT54G(L) ==== | ==== WRT54G(L) ==== | ||
informatique/linux/syslog.txt · Last modified: 2020/09/14 08:50 by pteu