wanmigs / system-check
A HTTP health check url that can be hit to perform basic application diagnostics
Installs: 659
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:package
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2024-04-29 04:13:25 UTC
README
- implement a HTTP health check API that can be hit to perform basic application diagnostics
- application instance health check
- application release health check
Setup Health Check
use wanmigs\HealthCheck\SystemCheck;
$system = new SystemCheck();
Health Check API
$system->getStatus()
results :
{
'status': 'OK'
'timestamp': '2019-06-14T04:01:03Z00:00'
'instance-id': '<hostname>'
}
$system->getPhpInfo()
Details :
- php version
- php component checks
results :
{
'timestamp': '2019-06-14T04:01:03Z00:00'
'instance-id': '<hostname>'
'php-version': 'php7.2'
'php-modules': [
'mbstring',
. . .
]
}
$system->getReleaseInfo()
Details :
- information stored from
build.json
generated from CI build
Defining build.json
path
Option 1
env GIT_BUILD_FILE_PATH
Option 2
$system->setBuildPath($path_to_build_json);
file resource :
build.json
{
'start': '2019-06-14T04:01:03Z00:00'
'end': '2019-06-14T04:01:03Z00:00',
'status': 'SUCCESS',
'branch': '<git-branch>',
'release': '<git-relesae-tag>',
'commit': '<git-commit-id>',
'build': '<CI-build-id>'
'config': '<configuration-id-from-CD>'
}
Laravel Setup Sample with database last migrations executed
https://gist.github.com/wanmigs/90db26e95be708f9d7b9ac6fd3052c62