LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-23-2018, 03:44 AM   #1
avihuh
LQ Newbie
 
Registered: Dec 2016
Posts: 19

Rep: Reputation: Disabled
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.
 
Old 10-23-2018, 11:26 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
What's the question?
 
Old 10-23-2018, 11:35 AM   #3
avihuh
LQ Newbie
 
Registered: Dec 2016
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
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
 
Old 10-23-2018, 04:14 PM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Don't know, sorry.

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

Last edited by Habitual; 10-23-2018 at 04:16 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[rsyslog] how to get the original IP address in rsyslog relay chain wolf4666 Linux - Software 4 10-18-2018 09:17 AM
rsyslog template problem ! shipon_97 Linux - Newbie 1 08-01-2016 08:04 AM
Resume creator - export options : template vs non-template approach vharishankar Programming 1 12-07-2011 11:11 PM
from django.template import Template, gives output firedancer Linux - Newbie 0 11-30-2007 02:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration