Class: Fluent::Plugin::EC2MetadataOutput

Inherits:
Output
  • Object
show all
Includes:
EC2Metadata
Defined in:
lib/fluent/plugin/out_ec2_metadata.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from EC2Metadata

#configure, #initialize

Instance Attribute Details

#ec2_metadataObject (readonly)

Returns the value of attribute ec2_metadata.



17
18
19
# File 'lib/fluent/plugin/out_ec2_metadata.rb', line 17

def 
  @ec2_metadata
end

Instance Method Details

#process(tag, es) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/fluent/plugin/out_ec2_metadata.rb', line 19

def process(tag, es)
  tag_parts = tag.split('.')
  es.each { |time, record|
    new_tag, new_record = modify(@output_tag, record, tag, tag_parts)
    router.emit(new_tag, time, new_record)
  }
rescue => e
  log.warn "ec2-metadata: #{e.class} #{e.message} #{e.backtrace.join(', ')}"
end