fluent-plugin-vmware-loginsight 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/{Dockerfile → fluentd-vrli-plugin-debian.dockerfile} +6 -2
- data/examples/fluentd-vrli-plugin-photon-tdnf.dockerfile +45 -0
- data/examples/fluentd-vrli-plugin-photon.dockerfile +68 -0
- data/fluent-plugin-vmware-loginsight.gemspec +1 -1
- data/lib/fluent/plugin/out_vmware_loginsight.rb +3 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c51be49fa1014357b97a164dd1d7f560a3370abdee80aa461323864a08799c00
|
4
|
+
data.tar.gz: c6de42ca3daa2d432a95ead1a9534ce61a09379ecd24bca06a87dbaaa56b98cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eaa154fcc5d89035c02f6544b5badb1258cb3af4bef6642aa54cba61791af656b98ea53bdf84ec299fd8b198e6a6ef479fbfb7ea737e0a37a477a71d818fc795
|
7
|
+
data.tar.gz: dc3c4176ffb0dc4765bbaa3bba6dc1cf94528daac797d8c8b6dae878585434faf96074bcd24390ad249424867fc499b3fc83360e71124f1607aa1f94c11e60b7
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Fluentd plugin for VMware Log Insight
|
2
2
|
#
|
3
|
-
# Copyright 2018 VMware, Inc. All Rights Reserved.
|
3
|
+
# Copyright 2018-2019 VMware, Inc. All Rights Reserved.
|
4
4
|
#
|
5
5
|
# This product is licensed to you under the MIT license (the "License"). You may not use this product except in compliance with the MIT License.
|
6
6
|
#
|
@@ -8,7 +8,11 @@
|
|
8
8
|
#
|
9
9
|
# SPDX-License-Identifier: MIT
|
10
10
|
|
11
|
-
|
11
|
+
# Builds a debian-based image that contains fluentd, fluent-plugin-vmware-loginsight, fluent-plugin-kubernetes_metadata_filter
|
12
|
+
# and fluent-plugin-systemd.
|
13
|
+
#
|
14
|
+
# The image is preconfigured with the fluent.conf from the examples dir. For more details see
|
15
|
+
# https://github.com/vmware/fluent-plugin-vmware-loginsight/blob/master/examples/fluent.conf
|
12
16
|
FROM fluent/fluentd:v0.14.15-debian-onbuild
|
13
17
|
# Above image expects the loginsight plugin vmware_loginsight to be available under ./plugins/vmware_loginsight.rb
|
14
18
|
# and fluentd config under ./fluent.conf by default
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Fluentd plugin for VMware Log Insight
|
2
|
+
#
|
3
|
+
# Copyright 2019 VMware, Inc. All Rights Reserved.
|
4
|
+
#
|
5
|
+
# This product is licensed to you under the MIT license (the "License"). You may not use this product except in compliance with the MIT License.
|
6
|
+
#
|
7
|
+
# This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
|
8
|
+
#
|
9
|
+
# SPDX-License-Identifier: MIT
|
10
|
+
|
11
|
+
# Builds a photon-based image that contains fluentd, fluent-plugin-vmware-loginsight some of the tools recommended by fluent
|
12
|
+
# (libjemalloc, oj, assync-http). This image is based on the minimalistic VMware Photon OS so the result is smaller in size.
|
13
|
+
# Furthermore, all of the needed components are installed from the trusted Photon repository by using the tdnf package manager.
|
14
|
+
#
|
15
|
+
# Fluentd is configured with the default configuration that gets produced by the `fluentd --setup` command. For an example of
|
16
|
+
# a configuration that uses the fluent-plugin-vmware-loginsight plugin check fluent.conf under the examples dir:
|
17
|
+
# https://github.com/vmware/fluent-plugin-vmware-loginsight/blob/master/examples/fluent.conf
|
18
|
+
|
19
|
+
FROM photon:3.0-20190705
|
20
|
+
|
21
|
+
USER root
|
22
|
+
|
23
|
+
# Distro sync and install components
|
24
|
+
RUN tdnf distro-sync --refresh -y \
|
25
|
+
&& tdnf install -y \
|
26
|
+
rubygem-fluentd-1.6.3 \
|
27
|
+
#
|
28
|
+
# optional but used by fluentd
|
29
|
+
rubygem-oj-3.3.10 \
|
30
|
+
rubygem-async-http-0.48.2 \
|
31
|
+
jemalloc-4.5.0 \
|
32
|
+
#
|
33
|
+
# Install Log Insight plugin
|
34
|
+
rubygem-fluent-plugin-vmware-loginsight-0.1.5
|
35
|
+
|
36
|
+
RUN ln -s /usr/lib/ruby/gems/2.5.0/bin/fluentd /usr/bin/fluentd \
|
37
|
+
&& fluentd --setup
|
38
|
+
|
39
|
+
# Make sure fluentd picks jemalloc
|
40
|
+
ENV LD_PRELOAD="/usr/lib/libjemalloc.so.2"
|
41
|
+
|
42
|
+
# Standard fluentd ports
|
43
|
+
EXPOSE 24224 5140
|
44
|
+
|
45
|
+
ENTRYPOINT ["/usr/bin/fluentd"]
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# Fluentd plugin for VMware Log Insight
|
2
|
+
#
|
3
|
+
# Copyright 2019 VMware, Inc. All Rights Reserved.
|
4
|
+
#
|
5
|
+
# This product is licensed to you under the MIT license (the "License"). You may not use this product except in compliance with the MIT License.
|
6
|
+
#
|
7
|
+
# This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
|
8
|
+
#
|
9
|
+
# SPDX-License-Identifier: MIT
|
10
|
+
|
11
|
+
# Builds a photon-based image that contains fluentd, fluent-plugin-vmware-loginsight some of the tools recommended by fluent
|
12
|
+
# (libjemalloc, oj, assync-http). This image is based on the minimalistic VMware Photon OS so the result is smaller in size.
|
13
|
+
#
|
14
|
+
# Fluentd is configured with the default configuration that gets produced by the `fluentd --setup` command. For an example of
|
15
|
+
# a configuration that uses the fluent-plugin-vmware-loginsight plugin check fluent.conf under the examples dir:
|
16
|
+
# https://github.com/vmware/fluent-plugin-vmware-loginsight/blob/master/examples/fluent.conf
|
17
|
+
FROM photon:3.0-20190705
|
18
|
+
|
19
|
+
USER root
|
20
|
+
|
21
|
+
RUN buildDeps="\
|
22
|
+
binutils linux-api-headers glibc-devel \
|
23
|
+
make gcc gmp-devel libffi-devel \
|
24
|
+
tar bzip2 sed gawk" \
|
25
|
+
#
|
26
|
+
# Distro sync and install build dependencies
|
27
|
+
&& tdnf distro-sync --refresh -y \
|
28
|
+
# Toybox conflicts with bzip2. The latter is needed to unpack libjemalloc
|
29
|
+
&& tdnf remove -y toybox \
|
30
|
+
&& tdnf install -y $buildDeps ruby \
|
31
|
+
#
|
32
|
+
# These are not required but are used if available
|
33
|
+
&& gem install oj -v 3.3.10 \
|
34
|
+
&& gem install json -v 2.2.0 \
|
35
|
+
&& gem install async-http -v 0.46.3 \
|
36
|
+
#
|
37
|
+
# Install fluentd
|
38
|
+
&& gem install --norc --no-document fluentd -v 1.6.3 \
|
39
|
+
&& mkdir -p /fluentd/etc /fluentd/plugins \
|
40
|
+
#
|
41
|
+
# Install Log Insight plugin
|
42
|
+
&& gem install --norc --no-document -v 0.1.5 fluent-plugin-vmware-loginsight \
|
43
|
+
#
|
44
|
+
# Install jemalloc 4.5.0
|
45
|
+
&& curl -L --output /tmp/jemalloc-4.5.0.tar.bz2 https://github.com/jemalloc/jemalloc/releases/download/4.5.0/jemalloc-4.5.0.tar.bz2 \
|
46
|
+
&& tar -C /tmp/ -xjvf /tmp/jemalloc-4.5.0.tar.bz2 \
|
47
|
+
&& cd /tmp/jemalloc-4.5.0 \
|
48
|
+
&& ./configure && make \
|
49
|
+
&& mv lib/libjemalloc.so.2 /usr/lib \
|
50
|
+
&& cd / \
|
51
|
+
#
|
52
|
+
# Cleanup to reduce image size
|
53
|
+
&& rm -rf /tmp/jemalloc-4.5.0* \
|
54
|
+
&& tdnf remove -y $buildDeps \
|
55
|
+
&& tdnf clean all \
|
56
|
+
&& gem sources --clear-all \
|
57
|
+
&& gem cleanup
|
58
|
+
|
59
|
+
# Create default fluent.conf
|
60
|
+
RUN fluentd --setup
|
61
|
+
|
62
|
+
# Make sure fluentd picks jemalloc
|
63
|
+
ENV LD_PRELOAD="/usr/lib/libjemalloc.so.2"
|
64
|
+
|
65
|
+
# Standard fluentd ports
|
66
|
+
EXPOSE 24224 5140
|
67
|
+
|
68
|
+
ENTRYPOINT ["/usr/bin/fluentd"]
|
@@ -14,7 +14,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
14
14
|
|
15
15
|
Gem::Specification.new do |spec|
|
16
16
|
spec.name = "fluent-plugin-vmware-loginsight"
|
17
|
-
spec.version = "0.1.
|
17
|
+
spec.version = "0.1.6"
|
18
18
|
spec.authors = ["Vishal Mohite", "Chris Todd"]
|
19
19
|
spec.email = ["vmohite@vmware.com", "toddc@vmware.com"]
|
20
20
|
|
@@ -136,7 +136,8 @@ module Fluent
|
|
136
136
|
else
|
137
137
|
flattened_records = record
|
138
138
|
end
|
139
|
-
|
139
|
+
# tag can be immutable in some cases, use a copy.
|
140
|
+
flattened_records[@tag_key] = tag.dup if @include_tag_key
|
140
141
|
fields = []
|
141
142
|
keys = []
|
142
143
|
log = ''
|
@@ -154,6 +155,7 @@ module Fluent
|
|
154
155
|
begin
|
155
156
|
value = value.to_json if value.is_a?(Hash)
|
156
157
|
value = value.to_s
|
158
|
+
value = value.frozen? ? value.dup : value # if value is immutable, use a copy.
|
157
159
|
value.force_encoding("utf-8")
|
158
160
|
rescue Exception=>e
|
159
161
|
$log.warn "force_encoding exception: " "#{e.class}, '#{e.message}', " \
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-vmware-loginsight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vishal Mohite
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-09-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -87,8 +87,10 @@ files:
|
|
87
87
|
- LICENSE
|
88
88
|
- README.md
|
89
89
|
- Rakefile
|
90
|
-
- examples/Dockerfile
|
91
90
|
- examples/fluent.conf
|
91
|
+
- examples/fluentd-vrli-plugin-debian.dockerfile
|
92
|
+
- examples/fluentd-vrli-plugin-photon-tdnf.dockerfile
|
93
|
+
- examples/fluentd-vrli-plugin-photon.dockerfile
|
92
94
|
- examples/k8s-log-collector-ds.yaml
|
93
95
|
- fluent-plugin-vmware-loginsight.gemspec
|
94
96
|
- lib/fluent/plugin/out_vmware_loginsight.rb
|