Results 1 to 4 of 4

Thread: Wowza logging via rsyslog?

  1. #1

    Default Wowza logging via rsyslog?

    Has anyone had any success getting Wowza (therefor log4j) to send messages to a remote logging server? We generally run multiple worker instances in a load balanced configuration, killing off unneeded workers when load drops off, and having to move their log files to a central point before terminating gets to be quite a chore. I'm thinking it would be a lot more convenient to have all workers log to a central rsyslogd machine. Unfortunately there doesn't seem to be a lot of information available on doing this.

    Has anybody implemented this solution before? If so, how did you go about making it work?

  2. #2
    Join Date
    Dec 2007
    Posts
    22,013

    Default

    The /conf/log4j.properties file has a commented out UDP appender. I don't have any experience with it, however

    Richard

  3. #3

    Default

    That would work, but since we bill customers based upon our log contents I really was looking for a solution that would use TCP.

    The solution I finally developed was to use rsyslog. I designated one of my lightly-loaded EC2 instances to be by rsyslog server, and in it's rsyslog.conf I included:

    $ModLoad imtcp # loads the tcp module
    $InputTCPServerRun 514 # defines what port to listen on
    $EscapeControlCharactersOnReceive off # Prevents rsyslog from turning tab into #011

    $template WowzaFormat,"%TIMESTAMP% %fromhost-ip% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n" # Defines log line format
    $ActionFileDefaultTemplate WowzaFormat

    local1.* /var/log/wowza.log # Specifies that all messages for facility "local1" get written to wowza log file

    Then on my worker instances I set up the rsyslog.conf with:

    $InputFileName /usr/local/WowzaMediaServer/logs/wowzamediaserver_access.log
    $InputFileTag wowzaAccess:
    $InputFileStateFile statefile_access
    #$InputFileSeverity info
    $InputFileFacility local1
    $InputRunFileMonitor

    local1.* @@<rsyslog listener server IP>
    #$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
    $template WowzaFormat,"%TIMESTAMP% %fromhost-ip% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n"
    $ActionFileDefaultTemplate WowzaFormat

    This setup has been working well for us for a couple of weeks now. I describe the setup process in a little more detail in my blog ( http://www.streemit.net/2012/04/20/r...ing-for-wowza/) but the basic info included here should provide enough to get you started if you find that you need to centralize your Wowza logs too.

  4. #4
    Join Date
    Dec 2007
    Posts
    22,013

    Default

    Very cool. Thank you for this great howto write-up. I will try it out.

    Richard

Similar Threads

  1. Wowza Logging
    By dobrien in forum Server Administration
    Replies: 4
    Last Post: 06-04-2014, 10:51 AM
  2. starting wowza with better logging?
    By sjensen in forum Server Administration Discussion
    Replies: 1
    Last Post: 11-01-2013, 08:49 AM
  3. Logging in WOWZa
    By milosk in forum Server-side Modules and Code Samples Discussion
    Replies: 3
    Last Post: 04-27-2012, 08:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •