So if you go to ORES dashboard on logstash, it's basically list of requests coming there. It took me so long to come with the idea of adding '-200' to remove 200 responses and then added '-404' and some other to get basic meaning of the logs. Still there is lots of nonsense regarding respawning web workers, etc. and you have to filter out so many words until you get some meaning out of it.
This task is done when we have a "Fatal monitor" dashboard for ores
Description
Details
Related Objects
- Mentioned In
- T178441: Upgrade celery to 4.1.0 for ORES
rORES58947e3ba1f6: Use json-lines instead of GELF for logstash
rORES51ec07c96237: Use json-lines instead of GELF for logstash
T181630: Send celery and wsgi service logs to logstash
T168921: Send error logs to logstash
T169586: Send celery logs and events to logstash
T181546: Let the ORES application set log severity, not uWSGI
rORESDEPLOYba4ea4056c86: Start using logstash
rORES9c10f5f581d0: Add LogstashHandler and LogstashFormatter (#268)
rORES38d385020d07: Add LogstashHandler and LogstashFormatter - Mentioned Here
- T178441: Upgrade celery to 4.1.0 for ORES
T168921: Send error logs to logstash
T169586: Send celery logs and events to logstash
T181546: Let the ORES application set log severity, not uWSGI
T181630: Send celery and wsgi service logs to logstash
Event Timeline
The reason that everything is INFO is that our uwsgi encoder is designed to do so: https://github.com/wikimedia/puppet/blob/production/modules/service/manifests/uwsgi.pp#L166
It's not easily fixable as uwsgi doesn't pass around log level: https://github.com/unbit/uwsgi/blob/3149df02ed443131c54ea6afb29fcbb0ed4d1139/core/logging.c#L1860
I'm basically thinking of writing a shiny support for logstash, that'll be fun. Only thing before moving forward: Does k8s solve this issue? if k8s can send everything in stderr to logstash, all work here would be useless. @akosiaris do you know more about this?
Yes, given how we did it it's expected. We should be deprecating this approach and not rely on uwsgi for logging or at the very least find a way to inform it of the log level (see below for an approach)
It's not easily fixable as uwsgi doesn't pass around log level: https://github.com/unbit/uwsgi/blob/3149df02ed443131c54ea6afb29fcbb0ed4d1139/core/logging.c#L1860
It's not up to uwsgi to pass around loglevel but per https://uwsgi-docs.readthedocs.io/en/latest/LogFormat.html#user-defined-logvars it might be doable
I'm basically thinking of writing a shiny support for logstash, that'll be fun. Only thing before moving forward: Does k8s solve this issue? if k8s can send everything in stderr to logstash, all work here would be useless. @akosiaris do you know more about this?
Partly (the application needs to cooperate). So the work we will be doing this quarter is about forwarding logs from applications running on kubernetes to logstash. The applications will be logging to stdout/stderr, in order to not break commonly expected working kubernetes patterns like kubectl logs <pod_name> and WMF infrastructure will be collecting those logs and forwarding them. I expect this to be declared ready for use at the end of the quarter, possibly a bit earlier.
However, note that kubernetes can not know the log level of an entry. It is something that only the application knows and it's the only one that should be setting that.
Change 466716 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[operations/puppet@production] ores: Add logstash config
Change 466716 merged by Alexandros Kosiaris:
[operations/puppet@production] ores: Add logstash config
Change 466857 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/services/ores/deploy@master] Start using logstash
Change 466857 merged by Ladsgroup:
[mediawiki/services/ores/deploy@master] Start using logstash
Change 470827 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[operations/puppet@production] ores: Change logstash port from GELF to json lines
Change 470827 merged by Dzahn:
[operations/puppet@production] ores: Change logstash port from GELF to json lines