PROJET AUTOBLOG


shaarli-Links

Site original : shaarli-Links

⇐ retour index

rsyslog : syntaxes et méthodologie de diagnostic - GuiGui's Show

mardi 3 mai 2022 à 09:18

https://shaarli.guiguishow.info/?IjArIg
https://shaarli.guiguishow.info/?Em6wqA
http://shaarli.guiguishow.info/?c-aKjw
https://www.rsyslog.com/doc/v8-stable/configuration/modules/omfwd.html

template (name="chemin-prog1"  type="string" string="/var/log/distant/%$year:::%/%$month:::%/%$day:::%/bidule/programme1.log")
template (name="chemin-prog2"  type="string" string="/var/log/distant/%$year:::%/%$month:::%/%$day:::%/bidule/programme2.log")

if $hostname == 'machine1' or $hostname == 'machine2' then {
    if $programname == 'prog1' then {
        action(type="omfile" dynaFile="chemin-prog1")
        stop
    }

    if $programname == 'prog2' then {
        action(type="omfile" dynaFile="chemin-prog2")
        stop
    }
}

Permalink