Class: Fluent::KubernetesOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::KubernetesOutput
- Defined in:
- lib/fluent/plugin/out_kubernetes.rb
Overview
Fluentd Kubernetes Output Plugin - Enrich Fluentd events with Kubernetes metadata
Copyright 2015 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Instance Method Summary collapse
- #configure(conf) ⇒ Object
- #emit(tag, es, chain) ⇒ Object
-
#initialize ⇒ KubernetesOutput
constructor
A new instance of KubernetesOutput.
Constructor Details
#initialize ⇒ KubernetesOutput
Returns a new instance of KubernetesOutput.
26 27 28 |
# File 'lib/fluent/plugin/out_kubernetes.rb', line 26 def initialize super end |
Instance Method Details
#configure(conf) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/fluent/plugin/out_kubernetes.rb', line 30 def configure(conf) super require 'docker' require 'json' end |
#emit(tag, es, chain) ⇒ Object
37 38 39 40 41 42 43 44 45 |
# File 'lib/fluent/plugin/out_kubernetes.rb', line 37 def emit(tag, es, chain) es.each do |time,record| Fluent::Engine.emit('kubernetes', time, enrich_record(tag, record)) end chain.next end |