Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grantstreetgroup/p5-healthcheck-diagnostic-dbhping
Perl HealthCheck Diagnostic for verifying database connectivity - https://grantstreetgroup.github.io/HealthCheck.html
https://github.com/grantstreetgroup/p5-healthcheck-diagnostic-dbhping
Last synced: about 1 month ago
JSON representation
Perl HealthCheck Diagnostic for verifying database connectivity - https://grantstreetgroup.github.io/HealthCheck.html
- Host: GitHub
- URL: https://github.com/grantstreetgroup/p5-healthcheck-diagnostic-dbhping
- Owner: GrantStreetGroup
- License: other
- Created: 2020-03-25T18:44:08.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-04T19:31:38.000Z (about 1 year ago)
- Last Synced: 2023-12-05T20:02:14.128Z (about 1 year ago)
- Language: Perl
- Size: 31.3 KB
- Stars: 0
- Watchers: 14
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# NAME
HealthCheck::Diagnostic::DBHPing - Ping a database handle to check its health
# VERSION
version v1.2.5
# SYNOPSIS
my $health_check = HealthCheck->new( checks => [
HealthCheck::Diagnostic::DBHPing->new( dbh => \&connect_to_db )
] );my $result = $health_check->check;
$result->{status}; # OK on a successful ping or CRITICAL otherwise# DESCRIPTION
Determines if the database connection is available.
Sets the `status` to "OK" or "CRITICAL" based on the
return value from `dbh->ping`.# ATTRIBUTES
Those inherited from ["ATTRIBUTES" in HealthCheck::Diagnostic](https://metacpan.org/pod/HealthCheck%3A%3ADiagnostic#ATTRIBUTES) plus:
## dbh
A coderef that returns a
[DBI database handle object](https://metacpan.org/pod/DBI#DBI-DATABSE-HANDLE-OBJECTS)
or optionally the handle itself.Can be passed either to `new` or `check`.
# DEPENDENCIES
[HealthCheck::Diagnostic](https://metacpan.org/pod/HealthCheck%3A%3ADiagnostic)
# CONFIGURATION AND ENVIRONMENT
None
# AUTHOR
Grant Street Group
# COPYRIGHT AND LICENSE
This software is Copyright (c) 2018 - 2023 by Grant Street Group.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)