Page MenuHomePhabricator

Get HHVM logs into logstash
Closed, ResolvedPublic

Description

The HHVM logs event stream is relayed from the HHVM servers to fluorine.eqiad.wmnet but is currently not stored in logstash.

There are 2 reasonable ways to add these log events to logstash:

  1. Add HHVM to the existing log2udp packet processing done in logstash. This would be a fairly trivial change as I'm fairly certain that udp2log is already relaying these events to the logstash listener but the events are not being tagged for storage in Elasticsearch.
  2. Add puppet configuration to forward the rsyslog event stream to logstash either via an intermediate relay on fluorine or by direct packets from the HHVM app servers. I have already created rules in the MW-Vagrant role::elk logstash role that does this and the event stream seems to be imported nicely with few intermediate processing steps needed.

I'd eventually like to kill off the use of log2udp relaying entirely as a logstash event feed mechanism, so I think that looking into the rsyslog event forwarding would be the better option.

Event Timeline

bd808 claimed this task.
bd808 raised the priority of this task from to High.
bd808 updated the task description. (Show Details)
bd808 changed Security from none to None.
bd808 subscribed.

I marked this as a high priority because this really should have been done as soon as @ori had the hhvm event forwarding setup and the rapidly growing hhvm server base needs easier error monitoring.

Change 176693 had a related patch set uploaded (by BryanDavis):
logstash: Forward syslog events for apache2 hhvm

https://gerrit.wikimedia.org/r/176693

Patch-For-Review

I have made two tasks as child of this:

T75262: Beta-cluster web server fills up /var/log with Apache logs
T71976: HHVM emits logs filling /var/log/upstart/hhvm.log and /var/log/syslog/ filling disk

I guess both would be resolved once logs are sent to logstash instead of being written on local disk.

I have made two tasks as child of this:

T75262: Beta-cluster web server fills up /var/log with Apache logs
T71976: HHVM emits logs filling /var/log/upstart/hhvm.log and /var/log/syslog/ filling disk

I guess both would be resolved once logs are sent to logstash instead of being written on local disk.

@hashar my initial patches are replicating the log event stream rather than diverting it, so they won't keep things from being written to disk on the individual hhvm hosts. If it's needed we could make followup patches that either conditionally (or maybe everywhere if that's reasonable) disable the local syslog output.

Change 176693 merged by Yuvipanda:
logstash: Forward syslog events for apache2 hhvm

https://gerrit.wikimedia.org/r/176693

HHVM log stream is being sent to logstash via rsylog forwarding in both beta and production. Prod dashboard at https://logstash.wikimedia.org/#/dashboard/elasticsearch/hhvm

I have made two tasks as child of this:

T75262: Beta-cluster web server fills up /var/log with Apache logs
T71976: HHVM emits logs filling /var/log/upstart/hhvm.log and /var/log/syslog/ filling disk

I guess both would be resolved once logs are sent to logstash instead of being written on local disk.

@hashar my initial patches are replicating the log event stream rather than diverting it, so they won't keep things from being written to disk on the individual hhvm hosts. If it's needed we could make followup patches that either conditionally (or maybe everywhere if that's reasonable) disable the local syslog output.

Understood. That is why I made the tasks to remove the local logs to be blocked by this logstash one. Now that we have logs centralized, we can look at disabling local logs \O/ Thank you!

yuvipanda mentioned this in Unknown Object (Diffusion Commit).Dec 10 2014, 8:37 PM