Add KomachiHeartbeat. defmodule Example.Router do use Plug.Router plug(:match) plug(:dispatch) forward("/ops", to: KomachiHeartbeat) end defmodule ExampleWeb.Router do use ExampleWeb, :router forward("/ops", KomachiHeartbeat) end
Check it. % curl http://localhost/ops/heartbeat heartbeat:ok Also available from Zabbix, ALB health check or Mackerel's "External Http monitor (外形監視)".
Add https://hex.pm/packages/sentry in your app. defmodule Example.Application do use Application def start(_type, _args) do Logger.add_backend(Sentry.LoggerBackend) … end defmodule Example.Router do use Sentry.Plug … end & add many metadata, by yourself (・﹏・)
KomachiHeartbeat has /stats endpoint that returns app's stats in JSON. mackerel-plugin-json posts any data gotten from JSON API as Mackerel custome metrics.
Add KomachiHeartbeat.BeamVital . defmodule TeijiBot.Router do use Plug.Router plug(:match) plug(:dispatch) forward( "/ops", to: KomachiHeartbeat, init_opts: [vitals: [KomachiHeartbeat.BeamVital]] ) end