0

this same question has already received a solution but it doesn't work

I'm looking for exactly this, I apply it in my rsyslog but it doesn't work for me, I restart my rsyslog, and nothing, I restart my operating system and there were no changes either.

@shintaroid asked the same question and got an answer but it doesn't seem to work for me.

I read somewhere that this from the TIMESTAMP is hard-coded at the rsyslog source code level.

Does anyone have a solution for this? Has anyone made it work without the TIMESTAMP?

3
  • 1
    The order of directives matter, so if you add the template definition after the logging is done, nothing would happen. Can you add your ryslog.conf file here?
    – Haxiel
    Aug 8 at 7:22
  • Thank you @Haxiel your info spark my mind to resolve this, am reading manual pages and documentation for make it run. it's almost done. Aug 8 at 20:02
  • my host is runing freebsd jails, one jail is rsyslog server, other jails are webservers that sends their logs. <[SERVER]> $ModLoad imtcp $InputTCPServerRun 514 $template myFormat,"%msg%\n" . /var/log/messages;myFormat <[REMOTE]> $ModLoad imfile global(workDirectory="/var/spool/rsyslog") $InputFileName /var/log/nginx/access.log $InputFileTag nginx: $InputRunFileMonitor @@192.168.0.250:514 Aug 8 at 20:09
1

Thanks to @Haxiel 'cause his comment spin up my research on rsyslog.conf man page and online documentation from official rsyslog site

my whole setup is a host running FreeBSD jails, one jail is rsyslog server, other jails are 'remote' web servers that sends their logs via tcp. everything inside one box/machine. host runs firewall that connect inter-jails communication and filters traffic as internet gateway.

<[SERVER]> 
$ModLoad imtcp 
$InputTCPServerRun 514 
$template myFormat,"%msg%\n" *.* /var/log/messages;myFormat 

<[REMOTE]> 
$ModLoad imfile 
global(workDirectory="/var/spool/rsyslog") 
$InputFileName /var/log/nginx/access.log 
$InputFileTag nginx: 
$InputRunFileMonitor 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.