module Statusz
Module for collecting diagnostic information and formatting it as an HTML page to serve on the /statusz endpoint.
Public Instance Methods
response(plugin)
click to toggle source
# File lib/fluent/plugin/statusz.rb, line 22 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_with_hash( plugin: plugin, uptime_str: uptime_str ) end