Class: Fluent::Plugin::MonitorAgentDetailInput::LTSVConfigMonitorServlet

Inherits:
ConfigMonitorServlet show all
Defined in:
lib/fluent/plugin/in_monitor_agent_detail.rb

Instance Method Summary collapse

Methods inherited from ConfigMonitorServlet

#build_object

Methods inherited from MonitorServlet

#build_object, #do_GET, #get_search_parameter, #initialize, #render_json, #render_json_error

Constructor Details

This class inherits a constructor from Fluent::Plugin::MonitorAgentDetailInput::MonitorServlet

Instance Method Details

#process(req, res) ⇒ Object



200
201
202
203
204
205
206
207
208
209
210
# File 'lib/fluent/plugin/in_monitor_agent_detail.rb', line 200

def process(req, res)
  result = build_object(req, res)

  row = []
  JSON.parse(result.to_json).each_pair { |k, v|
    row << "#{k}:#{v}"
  }
  text = row.join("\t")

  [200, {'Content-Type'=>'text/plain'}, text]
end