HealthCheck-Diagnostic-RemoteHealth
view release on metacpan or search on metacpan
HealthCheck::Diagnostic::RemoteHealth - Get results from an HTTP
HealthCheck
VERSION
version v0.1.2
SYNOPSIS
Returns the decoded JSON object from a HTTP HealthCheck endpoint.
$health_check->register(
HealthCheck::Diagnostic::RemoteHealth->new(
url => "https://example.com/healthz",
)
);
DESCRIPTION
Takes in a url to a HealthCheck JSON endpoint and checks to see if a
connection can be made. If the connection fails or the JSON object
cannot be decoded, the status is set to "CRITICAL". If both the
connection succeeds and the JSON object is successfully decoded, it
returns the decoded JSON object from the remote endpoint.
ATTRIBUTES
This diagnostic inherits all attributes from
HealthCheck::Diagnostic::WebRequest in addition to its own. status_code
is by default set to "200, 503".
url
The URL to the remote HealthCheck JSON endpoint. This typically ends in
"/healthz".
DEPENDENCIES
* HealthCheck::Diagnostic::WebRequest
* JSON
AUTHOR
lib/HealthCheck/Diagnostic/RemoteHealth.pm view on Meta::CPAN
=head1 NAME
HealthCheck::Diagnostic::RemoteHealth - Get results from an HTTP HealthCheck
=head1 VERSION
version v0.1.2
=head1 SYNOPSIS
Returns the decoded JSON object from a HTTP HealthCheck endpoint.
$health_check->register(
HealthCheck::Diagnostic::RemoteHealth->new(
url => "https://example.com/healthz",
)
);
=head1 DESCRIPTION
Takes in a C<url> to a HealthCheck JSON endpoint
and checks to see if a connection can be made.
If the connection fails or the JSON object cannot be decoded,
the C<status> is set to "CRITICAL".
If both the connection succeeds and the JSON object is successfully decoded,
it returns the decoded JSON object from the remote endpoint.
=head1 ATTRIBUTES
This diagnostic inherits all attributes from
L<HealthCheck::Diagnostic::WebRequest> in addition to its own.
C<status_code> is by default set to "200, 503".
=head2 url
The URL to the remote HealthCheck JSON endpoint. This typically ends in
"I</healthz>".
=head1 DEPENDENCIES
=over 4
=item *
L<HealthCheck::Diagnostic::WebRequest>
( run in 0.276 second using v1.01-cache-2.11-cpan-beeb90c9504 )