NervesHubLink.Extensions.Health (nerves_hub_link v2.10.2)

Copy Markdown View Source

The 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

Confirms if a health report has been sent.

Request a health report be sent asynchronously.

Functions

check_health(default_report \\ DefaultReport)

@spec check_health(module()) :: NervesHubLink.Extensions.Health.DeviceStatus.t() | nil

report_sent?()

@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

send_report()

@spec send_report() :: :ok

Request a health report be sent asynchronously.

Examples

iex> NervesHubLink.Extensions.Health.send_report()
:ok