{"id":16085725,"url":"https://github.com/infinitypaul/laravel-uptime","last_synced_at":"2025-03-18T06:30:33.728Z","repository":{"id":56991197,"uuid":"287943365","full_name":"infinitypaul/laravel-uptime","owner":"infinitypaul","description":"Keep track of critical endpoints with this command-line uptime monitor. Add an endpoint, set a frequency and listen to an event if something goes down.","archived":false,"fork":false,"pushed_at":"2020-08-16T14:37:52.000Z","size":96,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T07:36:51.818Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/infinitypaul.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-16T12:53:20.000Z","updated_at":"2021-01-29T08:26:32.000Z","dependencies_parsed_at":"2022-08-21T13:50:20.348Z","dependency_job_id":null,"html_url":"https://github.com/infinitypaul/laravel-uptime","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitypaul%2Flaravel-uptime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitypaul%2Flaravel-uptime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitypaul%2Flaravel-uptime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitypaul%2Flaravel-uptime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/infinitypaul","download_url":"https://codeload.github.com/infinitypaul/laravel-uptime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243906005,"owners_count":20366953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T13:09:09.454Z","updated_at":"2025-03-18T06:30:33.447Z","avatar_url":"https://github.com/infinitypaul.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Uptime - Stay Up And Running\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/infinitypaul/laravel-uptime.svg?style=flat-square)](https://packagist.org/packages/infinitypaul/laravel-uptime)\n[![Build Status](https://img.shields.io/travis/infinitypaul/laravel-uptime/master.svg?style=flat-square)](https://travis-ci.org/infinitypaul/laravel-uptime)\n[![Quality Score](https://img.shields.io/scrutinizer/g/infinitypaul/laravel-uptime.svg?style=flat-square)](https://scrutinizer-ci.com/g/infinitypaul/laravel-uptime)\n[![Total Downloads](https://img.shields.io/packagist/dt/infinitypaul/laravel-uptime.svg?style=flat-square)](https://packagist.org/packages/infinitypaul/laravel-uptime)\n\nKeep track of critical endpoints with this command-line uptime monitor. Add an endpoint, set a frequency and listen to an event if something goes down.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/infinitypaul/laravel-uptime/master/screen.jpeg\" /\u003e\u003c/p\u003e\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require infinitypaul/laravel-uptime\n```\n\n## Configuration\n\nTo publish Uptime's configuration and migration files, run the vendor:publish command.\n\n``` php\nphp artisan vendor:publish --provider=\"Infinitypaul\\LaravelUptime\\LaravelUptimeServiceProvider\"\n```\nThis will create a uptime.php in your config directory. The default configuration should work just fine for you, but you can take a look at it, if you want to customize the table / model names Uptime will use\n\nRun the migration command, to generate all tables needed for Uptime.\n\n```\nphp artisan migrate\n```\nAfter the migration, 2 new tables will be created:\n* endpoints - stores endpoint records\n* statuses - store the ping status of the endpoint\n\n\n\n### Commands\n\nOnce Package is Installed, The Following Commands Will Be Available To You\n\n| Command   |      Descriptions      |  Argument | Options\n|----------|:-------------:|------:|------:|\n| endpoint:add |  Add An Endpoint To Monitor | url eg: https://infinitypaul.com | Frequency in Minutes eg 20, default is 5 |\n| endpoint:remove |    Remove An Endpoint   |   id of the end endpoint eg 2 | null |\n| uptime:status | Display The Status Of All Endpoint |    null  | force : check for the status of the endpoint and display as well\n| uptime:run | Run The Whole Endpoint To Get Status |    null | force : get an immediate response of the endpoint irrespective of the minutes\n\n\n## Add An Endpoint\n\n``` bash\n php artisan endpoint:add https://infinitypaul.com -f 5\n```\nAdd Infinitypaul.com as a frequency of 5\n\n``` bash\n php artisan endpoint:add own -f 5\n```\nAdd The Base URL of your laravel project\n\n## Display All Endpoint\n```bash\nphp artisan uptime:status  \n```\nDisplay All the Endpoint And Status In A Beautiful Table\n\n```bash\nphp artisan uptime:status --force\n```\nCheck The Status Of The Endpoint Irrespective Of Their Frequency And Display As Well\n\n## Remove An Endpoint\n\n```bash\nphp artisan endpoint:remove\n```\nRemove An Endpoint From The List Of EndPoint To Be Monitored\n\n## Ping All Endpoint\n\n```bash\nphp artisan uptime:run\n```\nPing All The Endpoint And Get The Up Or Down Status In Order Of Their Frequency\n\n```bash\nphp artisan uptime:run --force\n```\n\nPing All The Endpoint And Get The Up Or Down Status Irrespective Of Their Frequency\n\n### Scheduling\n\nYou can add the run command in your task scheduling to run every minute\n\n```\nphp artisan uptime:run\n```\n\n### Endpoints Down/Up Events\n\nIf you need to run additional processes when an endpoint is down or back up, you can Listen for these events:\n\n```\n\\Infinitypaul\\LaravelUptime\\Events\\EndpointIsBackUp\n\n\\Infinitypaul\\LaravelUptime\\Events\\EndpointIsDown\n```\n\nIn your `EventServiceProvider` add your listener(s):\n\n```php\n/**\n * The event listener mappings for the application.\n *\n * @var array\n */\nprotected $listen = [\n    ...\n    \\Infinitypaul\\LaravelUptime\\Events\\EndpointIsBackUp::class =\u003e [\n        App\\Listeners\\URLIsBack::class,\n    ],\n    \\Infinitypaul\\LaravelUptime\\Events\\EndpointIsDown::class =\u003e [\n        App\\Listeners\\YourEndPointIsDown::class,\n    ],\n];\n```\n\nThe EndpointIsBackUp and EndpointIsDown event exposes the Endpoint and Status. In your listener, you can access them like so:\n\n```php\n\u003c?php\n\nnamespace App\\Listeners;\n\nuse Infinitypaul\\LaravelUptime\\Events\\EndpointIsBackUp;\n\nclass URLIsBack\n{\n    /**\n     * Create the event listener.\n     *\n     * @return void\n     */\n    public function __construct()\n    {\n        //\n    }\n\n    /**\n     * Handle the event.\n     *\n     * @param  EndpointIsBackUp  $event\n     * @return void\n     */\n    public function handle(EndpointIsBackUp $event)\n    {\n        // $endpointStatus = $event-\u003egetEndpointStatus();\n        // $EndpointDetails = $event-\u003egetEndpoint();\n\n        // Do something with the Endpoint and Status.\n    }\n}\n```\n\n\n## How can I thank you?\n\nWhy not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or HackerNews? Spread the word!\n\nDon't forget to [follow me on twitter](https://twitter.com/infinitypaul)!\n\nThanks!\nEdward Paul.\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinitypaul%2Flaravel-uptime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfinitypaul%2Flaravel-uptime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinitypaul%2Flaravel-uptime/lists"}