logstash-input-log4j 3.0.4-java → 3.0.5-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/inputs/log4j.rb +70 -1
- data/logstash-input-log4j.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99886f50d52483ced0a7b84bf489e9a97aded389
|
4
|
+
data.tar.gz: f4348e54ca42f510f4a0aac28b3a570057759f65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31849898a914389427fb261ddde01e0cd97c8a2ac5a7f31a6c099ab50c8043fca9dcb6ee478ecbf170f7b50fc65ec87ce9fbb558f230484b83886cdc223a2b5e
|
7
|
+
data.tar.gz: 4aa3b54acc891988517ff88b0af75445456d1f9c7a043e5375a54440e0f44b13cf16be2f277bbec8a2b7536e9cfeaf5ceab355359c63c7775cf0180ca4ae4f1c
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,74 @@ require "socket"
|
|
8
8
|
require "timeout"
|
9
9
|
require 'logstash-input-log4j_jars'
|
10
10
|
|
11
|
+
# ==== Deprecation Notice
|
12
|
+
#
|
13
|
+
# NOTE: This plugin is deprecated. It is recommended that you use filebeat to collect logs from log4j.
|
14
|
+
#
|
15
|
+
# The following section is a guide for how to migrate from SocketAppender to use filebeat.
|
16
|
+
#
|
17
|
+
# To migrate away from log4j SocketAppender to using filebeat, you will need to make 3 changes:
|
18
|
+
#
|
19
|
+
# 1) Configure your log4j.properties (in your app) to write to a local file.
|
20
|
+
# 2) Install and configure filebeat to collect those logs and ship them to Logstash
|
21
|
+
# 3) Configure Logstash to use the beats input.
|
22
|
+
#
|
23
|
+
# .Configuring log4j for writing to local files
|
24
|
+
#
|
25
|
+
# In your log4j.properties file, remove SocketAppender and replace it with RollingFileAppender.
|
26
|
+
#
|
27
|
+
# For example, you can use the following log4j.properties configuration to write daily log files.
|
28
|
+
#
|
29
|
+
# # Your app's log4j.properties (log4j 1.2 only)
|
30
|
+
# log4j.rootLogger=daily
|
31
|
+
# log4j.appender.daily=org.apache.log4j.rolling.RollingFileAppender
|
32
|
+
# log4j.appender.daily.RollingPolicy=org.apache.log4j.rolling.TimeBasedRollingPolicy
|
33
|
+
# log4j.appender.daily.RollingPolicy.FileNamePattern=/var/log/your-app/app.%d.log
|
34
|
+
# log4j.appender.daily.layout = org.apache.log4j.PatternLayout
|
35
|
+
# log4j.appender.daily.layout.ConversionPattern=%d{YYYY-MM-dd HH:mm:ss,SSSZ} %p %c{1}:%L - %m%n
|
36
|
+
#
|
37
|
+
# Configuring log4j.properties in more detail is outside the scope of this migration guide.
|
38
|
+
#
|
39
|
+
# .Configuring filebeat
|
40
|
+
#
|
41
|
+
# Next,
|
42
|
+
# https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-installation.html[install
|
43
|
+
# filebeat]. Based on the above log4j.properties, we can use this filebeat
|
44
|
+
# configuration:
|
45
|
+
#
|
46
|
+
# # filebeat.yml
|
47
|
+
# filebeat:
|
48
|
+
# prospectors:
|
49
|
+
# -
|
50
|
+
# paths:
|
51
|
+
# - /var/log/your-app/app.*.log
|
52
|
+
# input_type: log
|
53
|
+
# output:
|
54
|
+
# logstash:
|
55
|
+
# hosts: ["your-logstash-host:5000"]
|
56
|
+
#
|
57
|
+
# For more details on configuring filebeat, see
|
58
|
+
# https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-configuration.html[the filebeat configuration guide].
|
59
|
+
#
|
60
|
+
# .Configuring Logstash to receive from filebeat
|
61
|
+
#
|
62
|
+
# Finally, configure Logstash with a beats input:
|
63
|
+
#
|
64
|
+
# # logstash configuration
|
65
|
+
# input {
|
66
|
+
# beats {
|
67
|
+
# port => 5000
|
68
|
+
# }
|
69
|
+
# }
|
70
|
+
#
|
71
|
+
# It is strongly recommended that you also enable TLS in filebeat and logstash
|
72
|
+
# beats input for protection and safety of your log data..
|
73
|
+
#
|
74
|
+
# For more details on configuring the beats input, see
|
75
|
+
# https://www.elastic.co/guide/en/logstash/current/plugins-inputs-beats.html[the logstash beats input documentation].
|
76
|
+
#
|
77
|
+
# '''
|
78
|
+
#
|
11
79
|
# Read events over a TCP socket from a Log4j SocketAppender. This plugin works only with log4j version 1.x.
|
12
80
|
#
|
13
81
|
# Can either accept connections from clients or connect to a server,
|
@@ -61,13 +129,14 @@ class LogStash::Inputs::Log4j < LogStash::Inputs::Base
|
|
61
129
|
|
62
130
|
public
|
63
131
|
def register
|
64
|
-
|
65
132
|
begin
|
66
133
|
Java::OrgApacheLog4jSpi.const_get("LoggingEvent")
|
67
134
|
rescue
|
68
135
|
raise(LogStash::PluginLoadingError, "Log4j java library not loaded")
|
69
136
|
end
|
70
137
|
|
138
|
+
@logger.warn("This plugin is deprecated. Please use filebeat instead to collect logs from log4j applications.")
|
139
|
+
|
71
140
|
if server?
|
72
141
|
@logger.info("Starting Log4j input listener", :address => "#{@host}:#{@port}")
|
73
142
|
@server_socket = TCPServer.new(@host, @port)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-log4j'
|
4
|
-
s.version = '3.0.
|
4
|
+
s.version = '3.0.5'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Read events over a TCP socket from a Log4j SocketAppender"
|
7
7
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-log4j
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.5
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-codec-plain
|