NervesHubLink.Extensions.Health (nerves_hub_link v2.7.0)
View SourceThe Health Extension.
Provides metrics, metadata and alarms to allow building an understanding of the operational state of a device. The device's "health". This information is reported over the extensions mechanism to NervesHub for display, alerting and more.
Summary
Functions
Returns a specification to start this module under a supervisor.
Confirms if a health report has been sent.
Request a health report be sent asynchronously.
Functions
@spec check_health(module()) :: NervesHubLink.Extensions.Health.DeviceStatus.t() | nil
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec push(String.t(), map()) :: {:ok, Slipstream.push_reference()} | {:error, reason :: :detached | term()}
@spec report_sent?() :: boolean()
Confirms if a health report has been sent.
Examples
iex> NervesHubLink.Extensions.Health.report_sent?()
false
iex> NervesHubLink.Extensions.Health.send_report()
:ok
iex> NervesHubLink.Extensions.Health.report_sent?()
true
@spec send_report() :: :ok
Request a health report be sent asynchronously.
Examples
iex> NervesHubLink.Extensions.Health.send_report()
:ok