[mythtv-users] syslog

Mike Perkins mikep at randomtraveller.org.uk
Mon Jul 8 13:23:05 UTC 2013


On 08/07/13 13:46, Andréas Kühne wrote:
> 2013/7/8 Michael T. Dean <mtdean at thirdcontact.com>
>
>> On 07/04/2013 03:53 PM, Andréas Kühne wrote:
>>
>>> I have a problem with my mythtv server crashing every now and then. As a
>>> troubleshooting help, I got the tip to setup remote logging. I have now
>>> setup my remote logging server. However the logging from mythlogserver
>>> doesn't get forwarded to the server?
>>>
>>> I have removed all of the configuration for all of the separate logfiles,
>>> so everything is only logged in the syslog on the server. I have tried to
>>> add ALL logging to the remote server, but only log message from
>>> mythlogserver itself gets forwarded. Has anyone had a similar problem?
>>>
>>>
>> Post the syslog configuration file you're using and we can tell you what
>> you need to change.
>>
>
> This is the log on the mythtv server. I have added separate lines for
> local* because I got more logging on the remote server that way. Other than
> this file I also have the same configuration on the server as the one on
> http://www.mythtv.org/wiki/Simple_rsyslog_Configuration. The logs in
> /var/log/mythtv/ get written to with that configuration.
>
> Regards,
>
> Andréas
>
> #  /etc/rsyslog.conf Configuration file for rsyslog.
> #
> # For more information see
> # /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
> #
> #  Default logging rules can be found in /etc/rsyslog.d/50-default.conf
>
> local0.* @10.0.27.44
> local1.* @10.0.27.44
> local2.* @10.0.27.44
> local3.* @10.0.27.44
> local4.* @10.0.27.44
> local5.* @10.0.27.44
> local6.* @10.0.27.44
> local7.* @10.0.27.44
>
> *.* @10.0.27.44
> #################
> #### MODULES ####
> #################
>
> $ModLoad imuxsock # provides support for local system logging
> $ModLoad imklog   # provides kernel logging support (previously done by
> rklogd)
> #$ModLoad immark  # provides --MARK-- message capability
>
> # provides UDP syslog reception
> #$ModLoad imudp
> #$UDPServerRun 514
>
> # provides TCP syslog reception
> #$ModLoad imtcp
> #$InputTCPServerRun 514
>
>
> ###########################
> #### GLOBAL DIRECTIVES ####
> ###########################
>
> #
> # Use traditional timestamp format.
> # To enable high precision timestamps, comment out the following line.
> #
> $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
>
> # Filter duplicated messages
> $RepeatedMsgReduction on
>
> #
> # Set the default permissions for all log files.
> #
> $FileOwner syslog
> $FileGroup adm
> $FileCreateMode 0640
> $DirCreateMode 0755
> $Umask 0022
> $PrivDropToUser syslog
> $PrivDropToGroup syslog
>
> #
> # Where to place spool files
> #
> $WorkDirectory /var/spool/rsyslog
>
> #
> # Include all config files in /etc/rsyslog.d/
> #
> $IncludeConfig /etc/rsyslog.d/*.conf
>
I don't think it is a particularly good idea to put your own directives in the 
file *before* the global directives, although in this case it probably works fine.

Look at the very last directive - that includes any files under a subdirectory. 
You should put your own directives in a file in that directory. The only reason 
to do otherwise is if you are editing lines /out/ of the main config file.

Lastly, the "*.*" directive above /should/ mean that you don't need to specify 
any of the "local?.*" directives, as this includes all of them.

-- 

Mike Perkins



More information about the mythtv-users mailing list