Score:0

How can I translate my old rsyslog rules?

ba flag

I had this rule in previous rsyslog versions:

if $fromhost-ip == 'xxx.yyy.zzz.www' then /var/log/name_of_the_server.log
& stop

And I translate it as:

template (name="dinamico" type="string" string="/var/log/%HOSTNAME%.log")
if $inputname == 'imudp' then { action(type="omfile" dynaFile="dinamico") stop }

And works like a charm... but if I want to translate this old rule:

if $fromhost-ip == 'xxx.yyy.zzz.www' then /var/log/name_of_the_server.log
if $fromhost-ip == 'xxx.yyy.zzz.www' then @aaa.bbb.ccc.ddd:514
& stop

I can't translate it.. I've try a lot of options. This was the one I thought would work:

template (name="dinamico" type="string" string="/var/log/%HOSTNAME%.log")
if $inputname == 'imudp' then { action(type="omfile" dynaFile="dinamico") @aaa.bbb.ccc.ddd:514 stop }

But it doesn't work... How should I do it? Thanks!

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.