class Fluent::Plugin::PingMessageInput

Public Instance Methods

configure(conf) click to toggle source
Calls superclass method
# File lib/fluent/plugin/in_ping_message.rb, line 14
def configure(conf)
  super

  if @data.include?('${hostname}')
    @hostname ||= Socket.gethostname
    @data.gsub!('${hostname}', @hostname)
  end
end
multi_workers_ready?() click to toggle source
# File lib/fluent/plugin/in_ping_message.rb, line 23
def multi_workers_ready?
  true
end
start() click to toggle source
Calls superclass method
# File lib/fluent/plugin/in_ping_message.rb, line 27
def start
  super
  timer_execute(:in_ping_message_pingpong, @interval) do
    now = Fluent::Engine.now
    record = inject_values_to_record(@tag, now, {'data' => @data})
    router.emit(@tag, now, record)
  end
end