shlima / health_bit

Tiny health check of Rack apps like Rails, Sinatra for use with uptime checking systems like Kubernetes, Docker or Uptimerobot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: JSON Responses + Failure messages

rubendinho opened this issue · comments

It would be great to be able to configure response formats and customize

Currently, I'm able to do this for successful responses like so:

HealthBit.configure do |config|
  config.headers = {
    'Content-Type'  => 'application/json;charset=utf-8',
    'Cache-Control' => 'private,max-age=0,must-revalidate,no-store'
  }

  config.success_text = { status: 'ok' }.to_json
end

But this feels like a bit of a hack and there appears to be no way to configure the failure text.

Released in v 0.2.0