Archive:HOW-TO:Send xbmc.log to rsyslog: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Tomdeb
No edit summary
>UNiversal
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The following has been tested with Ubuntu 10.04 but should work with any distribution which include '''rsyslog''' and the [http://www.rsyslog.com/doc/imfile.html imfile module].
The following has been tested with Ubuntu 10.04 and should work with any distribution which include '''rsyslog''' and the [http://www.rsyslog.com/doc/imfile.html imfile module].


Note: Test in bold will need to be adapted to value which are relevant to your system.
* Create the following file with contents as below:


* Create the following file:
'''/etc/rsyslog.d/10-xbmc.conf '''
 
{{highlight|'''Note:'''|bordered=yes|color=#BEF781}} '''Text in bold''' will need to be adapted to value which are relevant to your system.
 
#
$ModLoad imfile
#
# /home/'''xbmc'''/.xbmc/temp/xbmc.log
$InputFileName /home/'''xbmc'''/.xbmc/temp/xbmc.log
$InputFileTag tag_xbmc_log:
$InputFileStateFile xbmc_log
$InputFileSeverity debug
$InputFileFacility local3
$InputRunFileMonitor
#
# check for new lines every 10 seconds
$InputFilePollingInterval 10
#
# send the log to a remote host: (optional)
local3.debug @'''<remote_host>'''
 
* restart rsyslog:
 
<source lang="bash">
sudo restart rsyslog
</source>
 
==Send xbmc.log across network==
Centralized rsyslog server monitoring<ref>http://www.howtoforge.com/centralized-rsyslog-server-monitoring</ref>
 
 
;Server side:
 
Uncomment these lines in /etc/rsyslog.conf


'''/etc/rsyslog.d/10-xbmc.conf '''
<pre>$ModLoad imtcp
  #
$InputTCPServerRun 514</pre>
  $ModLoad imfile
 
  #
* restart rsyslog:
  # /home/'''xbmc'''/.xbmc/temp/xbmc.log
 
  $InputFileName /home/'''xbmc'''/.xbmc/temp/xbmc.log
<source lang="bash">
  $InputFileTag tag_xbmc_log:
sudo restart rsyslog
  $InputFileStateFile xbmc_log
</source>
  $InputFileSeverity debug
 
  $InputFileFacility local3
 
  $InputRunFileMonitor
;Client side:
  #
 
  # check for new lines every 10 seconds
Add these lines to the MODULES section in /etc/rsyslog.conf
  $InputFilePollingInterval 10
 
   #
<pre>$WorkDirectory /rsyslog/work    # default location for work (spool) files
  # send the log to a remote host: (optional)
$ActionQueueType LinkedList    # use asynchronous processing
  local3.debug @'''<remote_host>'''
$ActionQueueFileName srvrfwd    # set file name, also enables disk mode
$ActionResumeRetryCount -1      # infinite retries on insert failure
$ActionQueueSaveOnShutdown on   # save in-memory data if rsyslog shuts down
*.* @@<server-ip-address>
</pre>


* restart rsyslog:
* restart rsyslog:


  sudo restart rsyslog
<source lang="bash">
sudo restart rsyslog
</source>


==References==
<references />


[[category:How To]][[category:linux]]
[[Category:How-to]]
[[Category:Linux]]

Revision as of 19:24, 20 December 2012

The following has been tested with Ubuntu 10.04 and should work with any distribution which include rsyslog and the imfile module.

  • Create the following file with contents as below:

/etc/rsyslog.d/10-xbmc.conf

Note: Text in bold will need to be adapted to value which are relevant to your system.

#
$ModLoad imfile
#
# /home/xbmc/.xbmc/temp/xbmc.log
$InputFileName /home/xbmc/.xbmc/temp/xbmc.log
$InputFileTag tag_xbmc_log:
$InputFileStateFile xbmc_log
$InputFileSeverity debug
$InputFileFacility local3
$InputRunFileMonitor
#
# check for new lines every 10 seconds
$InputFilePollingInterval 10
#
# send the log to a remote host: (optional)
local3.debug @<remote_host>
  • restart rsyslog:
sudo restart rsyslog

Send xbmc.log across network

Centralized rsyslog server monitoring[1]


Server side

Uncomment these lines in /etc/rsyslog.conf

$ModLoad imtcp
$InputTCPServerRun 514
  • restart rsyslog:
sudo restart rsyslog


Client side

Add these lines to the MODULES section in /etc/rsyslog.conf

$WorkDirectory /rsyslog/work    # default location for work (spool) files
$ActionQueueType LinkedList     # use asynchronous processing
$ActionQueueFileName srvrfwd    # set file name, also enables disk mode
$ActionResumeRetryCount -1      # infinite retries on insert failure
$ActionQueueSaveOnShutdown on   # save in-memory data if rsyslog shuts down
*.* @@<server-ip-address>
  • restart rsyslog:
sudo restart rsyslog

References