Module: Statusz
- Defined in:
- lib/fluent/plugin/statusz.rb
Overview
Module for collecting diagnostic information and formatting it as an HTML page to serve on the /statusz endpoint.
Class Method Summary collapse
-
.response(plugin) ⇒ Object
NOTE: The plugin parameter is referenced in STATUSZ_TMPL.
Class Method Details
.response(plugin) ⇒ Object
NOTE: The plugin parameter is referenced in STATUSZ_TMPL.
23 24 25 26 27 28 29 30 |
# File 'lib/fluent/plugin/statusz.rb', line 23 def response(plugin) uptime = Time.now - SERVER_START uptime_str = format('%<hours>d hr %<minutes>02d min %<seconds>02d sec', hours: uptime / 3600, minutes: (uptime / 60) % 60, seconds: uptime % 60) ERB.new(STATUSZ_TMPL).result(binding) end |