Author: - Post Category: Laravel, Resources - Date:January 5, 2020

Laravel runtime monitor

Monitoring your application

A laravel module to monitor runtime (php, laravel) versions, composer package versions and composer package licenses.

Categories: Laravel and Resources. Tags: laravel and monitoring.
Laravel Run time monitor banner

A laravel module to monitor runtime (php, laravel) versions, composer package versions and composer package licenses.

Usage – From the package’s details page:

The package registers some custom REST endpoints which can be used for monitoring. Make sure that the ANX_MONITORING_ACCESS_TOKEN is defined, since this is used for authorization. The endpoints will return a 401 HTTP_STATUS code if the token is not defined or invalid, or will return a 200 HTTP_STATUS code if everything went well.

Version monitoring of core and composer packages

Returns all a list with platform and composer package information.

URL: /anxapi/v1/modules?access_token=custom_access_token

Response headers:

Status Code: 200 OK Access-Control-Allow-Origin: * Access-Control-Allow-Credentials: true Allow: GET Content-Type: application/json

Response body:

{    "runtime":{       "platform":"php",       "platform_version":"7.0.19",       "framework":"laravel",       "framework_installed_version":"5.4.28",       "framework_newest_version":"5.4.28"    },    "modules":[       {          "name":"package-1",          "installed_version":"3.1.10",          "installed_version_licences":[             "BSD-2-Clause"          ],          "newest_version":"3.3.2",          "newest_version_licences":[             "BSD-3-Clause"          ]       },       {          "name":"package-2",          "installed_version":"1.4",          "installed_version_licences":[             "MIT"          ],          "newest_version":"1.4",          "newest_version_licences":[             "MIT"          ]       },       ...    ] }

Live monitoring

This endpoint can be used to verify if the application is alive and working correctly. It checks if the database connection is working. It allows to register custom checks by using hooks.

URL: /anxapi/v1/up?access_token=custom_access_token

Response headers:

Status Code: 200 OK Access-Control-Allow-Origin: * Access-Control-Allow-Credentials: true Allow: GET Content-Type: text/plain

Response body:

OK

https://packagist.org/packages/anexia/laravel-monitoring