fluent-plugin-kubernetes_sumologic 0.0.1 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +3 -1
- data/Dockerfile +5 -2
- data/README.md +4 -2
- data/ci/build.sh +4 -4
- data/conf.d/forward/.gitignore +1 -0
- data/entrypoint.sh +1 -1
- data/etc/fluent.forward.conf +18 -0
- data/fluent-plugin-kubernetes_sumologic.gemspec +3 -4
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4747f2253f58c1c9c9f6c94486884381bb3f0477f26ca7d4b3f5f8234f5a8498
|
|
4
|
+
data.tar.gz: 306be127290383599712dd2f48a907836ce44a04fe2cf3e8146b53a1554cedbe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f56475ddff67518a13bc3b3f28d0f62055bdd4755eba3002a13203c93983f631a1d3323b8ff079513fd15090b70665e0e629439edc40cc07a011423780283896
|
|
7
|
+
data.tar.gz: b3d79819aa770e6791e82242ce66b5089704f458532ff4bd94affd3b4c42759e2fa00962b14eed3a9bad70b149b197740e1327490eaa37f0f598c4af203def10
|
data/.travis.yml
CHANGED
data/Dockerfile
CHANGED
|
@@ -2,6 +2,8 @@ FROM fluent/fluentd:v1.3.2-debian AS builder
|
|
|
2
2
|
|
|
3
3
|
ENV PATH /home/fluent/.gem/ruby/2.3.0/bin:$PATH
|
|
4
4
|
|
|
5
|
+
COPY ./fluent-plugin-kubernetes_sumologic*.gem ./
|
|
6
|
+
|
|
5
7
|
# New fluent image dynamically creates user in entrypoint
|
|
6
8
|
RUN [ -f /bin/entrypoint.sh ] && /bin/entrypoint.sh echo || : && \
|
|
7
9
|
apt-get update && \
|
|
@@ -14,6 +16,7 @@ RUN [ -f /bin/entrypoint.sh ] && /bin/entrypoint.sh echo || : && \
|
|
|
14
16
|
gem install fluent-plugin-concat -v 2.3.0 && \
|
|
15
17
|
gem install fluent-plugin-rewrite-tag-filter -v 2.1.0 && \
|
|
16
18
|
gem install fluent-plugin-prometheus -v 1.1.0 && \
|
|
19
|
+
gem install fluent-plugin-kubernetes_sumologic && \
|
|
17
20
|
rm -rf /home/fluent/.gem/ruby/2.3.0/cache/*.gem && \
|
|
18
21
|
gem sources -c && \
|
|
19
22
|
apt-get remove --purge -y build-essential ruby-dev libffi-dev libsystemd-dev && \
|
|
@@ -59,12 +62,12 @@ ENV K8S_METADATA_FILTER_VERIFY_SSL "true"
|
|
|
59
62
|
ENV K8S_METADATA_FILTER_BEARER_CACHE_SIZE "1000"
|
|
60
63
|
ENV K8S_METADATA_FILTER_BEARER_CACHE_TTL "3600"
|
|
61
64
|
ENV VERIFY_SSL "true"
|
|
65
|
+
ENV FORWARD_INPUT_BIND "0.0.0.0"
|
|
66
|
+
ENV FORWARD_INPUT_PORT "24224"
|
|
62
67
|
|
|
63
68
|
COPY --from=builder /var/lib/gems /var/lib/gems
|
|
64
69
|
COPY ./conf.d/ /fluentd/conf.d/
|
|
65
70
|
COPY ./etc/* /fluentd/etc/
|
|
66
71
|
COPY ./entrypoint.sh /fluentd/
|
|
67
|
-
COPY ./fluent-plugin-kubernetes_sumologic*.gem ./
|
|
68
|
-
RUN gem install fluent-plugin-kubernetes_sumologic
|
|
69
72
|
|
|
70
73
|
ENTRYPOINT ["/fluentd/entrypoint.sh"]
|
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[](https://travis-ci.org/SumoLogic/fluentd-kubernetes-sumologic) [](https://github.com/SumoLogic/fluentd-output-sumologic/issues)
|
|
1
|
+
[](https://travis-ci.org/SumoLogic/fluentd-kubernetes-sumologic) [](https://badge.fury.io/rb/fluent-plugin-kubernetes_sumologic) [](https://hub.docker.com/r/sumologic/fluentd-kubernetes-sumologic) [](https://github.com/SumoLogic/fluentd-output-sumologic/issues)
|
|
2
2
|
|
|
3
3
|
This page describes the Sumo Kubernetes [Fluentd](http://www.fluentd.org/) plugin.
|
|
4
4
|
|
|
@@ -96,7 +96,7 @@ Environment | Variable Description
|
|
|
96
96
|
`EXCLUDE_POD_REGEX`|A regular expression for pods. Matching pods will be excluded from Sumo. The logs will still be sent to FluentD.
|
|
97
97
|
`EXCLUDE_PRIORITY_REGEX`|A regular expression for syslog [priorities](https://en.wikipedia.org/wiki/Syslog#Severity_level). Matching priorities will be excluded from Sumo. The logs will still be sent to FluentD.
|
|
98
98
|
`EXCLUDE_UNIT_REGEX` |A regular expression for `systemd` units. Matching units will be excluded from Sumo. The logs will still be sent to FluentD.
|
|
99
|
-
`FLUENTD_SOURCE`|Fluentd can tail
|
|
99
|
+
`FLUENTD_SOURCE`|Fluentd can use log tail, systemd query or forward as the source, Allowable values: `file`, `systemd`, `forward`. <br/><br/>Default: `file`
|
|
100
100
|
`FLUENTD_USER_CONFIG_DIR`|A directory of user-defined fluentd configuration files, which must be in the `*.conf` directory in the container.
|
|
101
101
|
`FLUSH_INTERVAL` |How frequently to push logs to Sumo.<br/><br/>Default: `5s`
|
|
102
102
|
`KUBERNETES_META`|Include or exclude Kubernetes metadata such as `namespace` and `pod_name` if using JSON log format. <br/><br/>Default: `true`
|
|
@@ -128,6 +128,8 @@ Environment | Variable Description
|
|
|
128
128
|
`K8S_METADATA_FILTER_BEARER_CACHE_TTL`|Option to control the enabling of [metadata filter plugin cache_ttl](https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter#configuration). Default: `3600`
|
|
129
129
|
`K8S_NODE_NAME`|If set, improves [caching of pod metadata](https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter#environment-variables-for-kubernetes) and reduces API calls.
|
|
130
130
|
`VERIFY_SSL`|Verify ssl certificate of sumologic endpoint. Default: `true`
|
|
131
|
+
`FORWARD_INPUT_BIND`|The bind address to listen to if using forward as `FLUENTD_SOURCE`. Default: `0.0.0.0` (all addresses)
|
|
132
|
+
`FORWARD_INPUT_PORT`|The port to listen to if using forward as `FLUENTD_SOURCE`. Default: `24224`
|
|
131
133
|
|
|
132
134
|
|
|
133
135
|
The following table show which environment variables affect which Fluentd sources.
|
data/ci/build.sh
CHANGED
|
@@ -4,6 +4,7 @@ echo "Starting build process in: `pwd`"
|
|
|
4
4
|
set -e
|
|
5
5
|
|
|
6
6
|
VERSION="${TRAVIS_TAG:-0.0.0}"
|
|
7
|
+
VERSION="${VERSION#v}"
|
|
7
8
|
: "${DOCKER_TAG:=sumologic/fluentd-kubernetes-sumologic}"
|
|
8
9
|
: "${DOCKER_USERNAME:=sumodocker}"
|
|
9
10
|
PLUGIN_NAME="fluent-plugin-kubernetes_sumologic"
|
|
@@ -22,15 +23,14 @@ echo "Build gem $PLUGIN_NAME $VERSION..."
|
|
|
22
23
|
gem build $PLUGIN_NAME
|
|
23
24
|
|
|
24
25
|
echo "Building docker image with $DOCKER_TAG:$VERSION and $DOCKER_TAG:latest in `pwd`..."
|
|
25
|
-
docker build . -f ./Dockerfile -t $DOCKER_TAG
|
|
26
|
+
docker build . -f ./Dockerfile -t $DOCKER_TAG:v$VERSION --no-cache
|
|
26
27
|
docker build . -f ./Dockerfile -t $DOCKER_TAG:latest
|
|
27
|
-
|
|
28
|
-
if [[ -z "${DOCKER_PASSWORD}" ]] || [[ -z "${TRAVIS_TAG}" ]]; then
|
|
28
|
+
if [ -z "$DOCKER_PASSWORD" ] || [ -z "$TRAVIS_TAG" ]; then
|
|
29
29
|
echo "Skip Docker pushing"
|
|
30
30
|
else
|
|
31
31
|
echo "Pushing docker image with $DOCKER_TAG:$VERSION and $DOCKER_TAG:latest..."
|
|
32
32
|
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
|
33
|
-
docker push $DOCKER_TAG
|
|
33
|
+
docker push $DOCKER_TAG:v$VERSION
|
|
34
34
|
docker push $DOCKER_TAG:latest
|
|
35
35
|
fi
|
|
36
36
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# placeholder
|
data/entrypoint.sh
CHANGED
|
@@ -4,7 +4,7 @@ if [ $# -gt 0 ] && [ "${1:0:1}" != "-" ]; then
|
|
|
4
4
|
else
|
|
5
5
|
cd `dirname $0`
|
|
6
6
|
|
|
7
|
-
if
|
|
7
|
+
if ! ls /fluentd/etc/fluent.${FLUENTD_SOURCE}.conf > /dev/null; then
|
|
8
8
|
echo "Unknown source '$FLUENTD_SOURCE'"
|
|
9
9
|
if [ -e /dev/termination-log ]; then
|
|
10
10
|
echo "Unknown source '$FLUENTD_SOURCE'" >/dev/termination-log
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
## built-in TCP input
|
|
2
|
+
## $ echo <json> | fluent-cat <tag>
|
|
3
|
+
<source>
|
|
4
|
+
@type forward
|
|
5
|
+
@id forward_input
|
|
6
|
+
port "#{ENV['FORWARD_INPUT_PORT']}"
|
|
7
|
+
bind "#{ENV['FORWARD_INPUT_BIND']}"
|
|
8
|
+
</source>
|
|
9
|
+
|
|
10
|
+
<source>
|
|
11
|
+
@type monitor_agent
|
|
12
|
+
bind 0.0.0.0
|
|
13
|
+
port 24220
|
|
14
|
+
</source>
|
|
15
|
+
|
|
16
|
+
@include /fluentd/conf.d/forward/source.*.conf
|
|
17
|
+
@include /fluentd/conf.d/user/*.conf
|
|
18
|
+
@include /fluentd/conf.d/out.sumo.conf
|
|
@@ -4,9 +4,9 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |gem|
|
|
6
6
|
gem.name = "fluent-plugin-kubernetes_sumologic"
|
|
7
|
-
gem.version = "
|
|
8
|
-
gem.authors = ["
|
|
9
|
-
gem.email = ["
|
|
7
|
+
gem.version = "2.3.1"
|
|
8
|
+
gem.authors = ["Sumo Logic"]
|
|
9
|
+
gem.email = ["collection@sumologic.com"]
|
|
10
10
|
gem.description = %q{FluentD plugin to extract logs from Kubernetes clusters, enrich and ship to Sumo logic.}
|
|
11
11
|
gem.summary = %q{FluentD plugin to extract logs from Kubernetes clusters, enrich and ship to Sumo logic.}
|
|
12
12
|
gem.homepage = "https://github.com/SumoLogic/fluentd-kubernetes-sumologic"
|
|
@@ -16,7 +16,6 @@ Gem::Specification.new do |gem|
|
|
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
|
18
18
|
gem.require_paths = ["lib"]
|
|
19
|
-
gem.has_rdoc = false
|
|
20
19
|
|
|
21
20
|
gem.required_ruby_version = '>= 2.0.0'
|
|
22
21
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-kubernetes_sumologic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
7
|
+
- Sumo Logic
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-03-
|
|
11
|
+
date: 2019-03-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -97,7 +97,7 @@ dependencies:
|
|
|
97
97
|
description: FluentD plugin to extract logs from Kubernetes clusters, enrich and ship
|
|
98
98
|
to Sumo logic.
|
|
99
99
|
email:
|
|
100
|
-
-
|
|
100
|
+
- collection@sumologic.com
|
|
101
101
|
executables: []
|
|
102
102
|
extensions: []
|
|
103
103
|
extra_rdoc_files: []
|
|
@@ -107,7 +107,6 @@ files:
|
|
|
107
107
|
- CHANGELOG.md
|
|
108
108
|
- Dockerfile
|
|
109
109
|
- Gemfile
|
|
110
|
-
- Gemfile.lock
|
|
111
110
|
- LICENSE
|
|
112
111
|
- README.md
|
|
113
112
|
- Rakefile
|
|
@@ -115,6 +114,7 @@ files:
|
|
|
115
114
|
- conf.d/file/source.containers.conf
|
|
116
115
|
- conf.d/file/source.docker.conf
|
|
117
116
|
- conf.d/file/source.kubernetes.conf
|
|
117
|
+
- conf.d/forward/.gitignore
|
|
118
118
|
- conf.d/out.sumo.conf
|
|
119
119
|
- conf.d/systemd/source.containers.conf
|
|
120
120
|
- conf.d/systemd/source.systemd.conf
|
|
@@ -122,6 +122,7 @@ files:
|
|
|
122
122
|
- daemonset/rbac/fluentd.yaml
|
|
123
123
|
- entrypoint.sh
|
|
124
124
|
- etc/fluent.file.conf
|
|
125
|
+
- etc/fluent.forward.conf
|
|
125
126
|
- etc/fluent.systemd.conf
|
|
126
127
|
- fluent-plugin-kubernetes_sumologic.gemspec
|
|
127
128
|
- lib/fluent/plugin/filter_kubernetes_sumologic.rb
|
|
@@ -150,8 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
150
151
|
- !ruby/object:Gem::Version
|
|
151
152
|
version: '0'
|
|
152
153
|
requirements: []
|
|
153
|
-
|
|
154
|
-
rubygems_version: 2.7.3
|
|
154
|
+
rubygems_version: 3.0.3
|
|
155
155
|
signing_key:
|
|
156
156
|
specification_version: 4
|
|
157
157
|
summary: FluentD plugin to extract logs from Kubernetes clusters, enrich and ship
|