All users were logged out of Bugzilla on October 13th, 2018

Send relengapi logs to log-aggregator

RESOLVED FIXED

Status

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: dustin, Assigned: dustin)

Tracking

Details

This should include what's currently going to relengapi.log as well as the Apache access logs.
I set up a SysLogHandler in relengapi.wsgi and deployed that.  Data is flowing!

Access logs remain TBD
On Amy's advice I reconfigured the SysLogHandler to log to localhost, and also fixed up the formatting so that it produces legit output.  I still need to land the puppet patch to make those hosts forward to our aggregators.
# see http://help.papertrailapp.com/kb/configuration/configuring-centralized-logging-from-python-apps/
syslog_formatter = logging.Formatter(
    '%(asctime)s ' + socket.gethostname() + ' relengapi: %(message)s', datefmt='%b %d %H:%M:%S')
sys_log = logging.handlers.SysLogHandler(socktype=socket.SOCK_DGRAM)
sys_log.setLevel(logging.INFO)
sys_log.setFormatter(syslog_formatter)

Apache logs are as simple as http://blog.papertrailapp.com/send-apache-access-logs-to-remote-syslog-in-1-line/
I enabled logging to syslog for all vhosts in the releng cluster, too, in r103928.
OK, looking good!

The access logs are pretty voluminous, so we may need to filter those back at some point.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.