LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   rsyslog template (https://www.linuxquestions.org/questions/linux-general-1/rsyslog-template-4175640946/)

avihuh 10-23-2018 03:44 AM

rsyslog template
 
Hi guys,

I’ve created a template in rsyslog to take each output over UDP to different log file by host name.
Im having a small issue, when im testing netconsole and im crashing one of the machine by “ echo c > /proc/sysrq-trigger” its redirecting the all output to correct file except for what there’s in “Call trace” after code, and creating different file for each output after “code” in “Call trace”

This the output in “Call trace” after code:
Code:

“00  01  04  05  0f  1f  25  31  34  39  41  44  45  47  48  4c  55  5d  65  75  81  89  9b  NULL  PMD  PUD  SMP  Trigger  ae  be  c0  c3  c7  db  e2  e5  e8  eb  ef  f4  f7  f8  ff”
And I don’t know why but its creating for each one in this output different file.

Here’s my rsyslog configuration:
Code:

$template RemoteHost,"/var/syslog/hosts/%HOSTNAME%.log"
$RuleSet remote
*.* ?RemoteHost

All the other outputs are stored correctly in files.
Somehow rsyslog think the each one of this file is a hostname.

Habitual 10-23-2018 11:26 AM

What's the question?

avihuh 10-23-2018 11:35 AM

Quote:

Originally Posted by Habitual (Post 5918361)
What's the question?

The question is why for each output in the line I mentioned it’s creating new file instead enter it to the correct file

Habitual 10-23-2018 04:14 PM

Don't know, sorry.

The "configuration" is a little sparse.
Is that the entire config?
What version of rsyslog


All times are GMT -5. The time now is 03:24 PM.