Project

General

Profile

LogstashIntegration » History » Version 1

Lukas Zapletal, 07/22/2015 04:17 AM
Initial idea

1 1 Lukas Zapletal
h1. Logstash Integration
2 1 Lukas Zapletal
3 1 Lukas Zapletal
h2. Summary
4 1 Lukas Zapletal
5 1 Lukas Zapletal
Foreman has many compoments involved and when Katello plugin is installed with it's
6 1 Lukas Zapletal
orchestration capabilities as well as other plugins, possibility to effectively collect
7 1 Lukas Zapletal
logs in a single place with flexible metadata and interface is a big plus.
8 1 Lukas Zapletal
9 1 Lukas Zapletal
Logstash open-source project was picked up as the target to integrate with. It is a Ruby
10 1 Lukas Zapletal
modular framework (jRuby actually) with modular backends and inputs.
11 1 Lukas Zapletal
12 1 Lukas Zapletal
https://github.com/elastic/logstash
13 1 Lukas Zapletal
14 1 Lukas Zapletal
h2. Owners
15 1 Lukas Zapletal
16 1 Lukas Zapletal
* Lukáš Zapletal (Foreman) - `lzap_at_redhat_dot_com`
17 1 Lukas Zapletal
18 1 Lukas Zapletal
h2. Current status
19 1 Lukas Zapletal
20 1 Lukas Zapletal
* Design done
21 1 Lukas Zapletal
* Not yet implemented
22 1 Lukas Zapletal
23 1 Lukas Zapletal
h2. Implementation
24 1 Lukas Zapletal
25 1 Lukas Zapletal
Foreman uses logging gem which is modular log4j-like logging framework with great
26 1 Lukas Zapletal
extensibility. Although direct integration via logging-logstash should be possible (https://rubygems.org/gems/logging-logstash/versions/0.0.2),
27 1 Lukas Zapletal
integration via journald would provide better flexibility of logging from all other
28 1 Lukas Zapletal
components (foreman-proxy, backend systems) or even scripts (seed, migrate, foreman_hooks) with support of all
29 1 Lukas Zapletal
metadata. There is a POC journald reader for logstash available: https://github.com/stuart-warren/logstash-input-journald
30 1 Lukas Zapletal
31 1 Lukas Zapletal
h2. Metadata
32 1 Lukas Zapletal
33 1 Lukas Zapletal
Foreman would benefit from the following extra logging fields:
34 1 Lukas Zapletal
35 1 Lukas Zapletal
* Session ID: User session - usually a browser session if applicable.
36 1 Lukas Zapletal
37 1 Lukas Zapletal
* Transaction/Correlation ID - Usually UUID of the transaction that the logs belong to. This way we can correlate logs from orchestration runs for all services that are under our control: Foreman, Foreman-Proxy, Plugins, Candlepin, Pulp