2 Replies Latest reply on Mar 12, 2014 9:12 AM by Wowwow-Oracle

    rsyslog + netconsole




      I configured rsyslog to receive from netconsole.


      Here is my /etc/rsyslog.conf below:



      $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

      $ModLoad imtcp

      $InputTCPServerRun 514

      $ModLoad imudp

      $UDPServerRun 514

      $template PerHostMessages,"/var/log/rsyslog/%HOSTNAME%/messages"

      *.*          ?PerHostMessages


      It puts logs correctly into subdirectories. When I do echo "test message" > /dev/kmsg from the client,  it put the messages correctly into the per-host directory but  at the same time, create an extra subdirectory call "test" which is the 1st word of my message.


      Any advice?




        • 1. Re: rsyslog + netconsole

          What OS are you using? Like Oracle Linux 6.5 x64? And last not least, which version or rsyslog are using?


          What happens if you change the template to:


          $template PerHostMessages,"/var/log/system-%HOSTNAME%.log"

          • 2. Re: rsyslog + netconsole

            OL5.8 and rsyslogd 3.22.1 (yes, pretty old but this is what comes with the OS)



            But I think I solve the problem.


            I've inadvertently omitted the following lines:


            # Provides kernel logging support (previously done by rklogd)

            $ModLoad imklog

            # Provides support for local system logging (e.g. via logger command)

            $ModLoad imuxsock