Customizing the uptime check | laravel-uptime-monitor | Spatie

 SPATIE

  Laravel Uptime Monitor
=========================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-uptime-monitor](https://spatie.be/docs/laravel-uptime-monitor/v1)  Advanced-usage  Customizing the uptime check

 Version   v3   v2   v1

 Other versions for crawler [v3](https://spatie.be/docs/laravel-uptime-monitor/v3) [v2](https://spatie.be/docs/laravel-uptime-monitor/v2) [v1](https://spatie.be/docs/laravel-uptime-monitor/v1)

- [ Introduction ](https://spatie.be/docs/laravel-uptime-monitor/v1/introduction)
- [ Postcardware ](https://spatie.be/docs/laravel-uptime-monitor/v1/postcardware)
- [ Requirements ](https://spatie.be/docs/laravel-uptime-monitor/v1/requirements)
- [ High level overview ](https://spatie.be/docs/laravel-uptime-monitor/v1/high-level-overview)
- [ Installation and setup ](https://spatie.be/docs/laravel-uptime-monitor/v1/installation-and-setup)
- [ Questions &amp; issues ](https://spatie.be/docs/laravel-uptime-monitor/v1/questions-and-issues)
- [ Changelog ](https://spatie.be/docs/laravel-uptime-monitor/v1/changelog)
- [ About us ](https://spatie.be/docs/laravel-uptime-monitor/v1/about-us)

Monitoring uptime
-----------------

- [ Adding and removing sites ](https://spatie.be/docs/laravel-uptime-monitor/v1/monitoring-uptime/getting-started)
- [ Events ](https://spatie.be/docs/laravel-uptime-monitor/v1/monitoring-uptime/events)
- [ Notifications ](https://spatie.be/docs/laravel-uptime-monitor/v1/monitoring-uptime/notifications)

Monitoring ssl certificates
---------------------------

- [ Getting started ](https://spatie.be/docs/laravel-uptime-monitor/v1/monitoring-ssl-certificates/getting-started)
- [ Events ](https://spatie.be/docs/laravel-uptime-monitor/v1/monitoring-ssl-certificates/events)
- [ Notifications ](https://spatie.be/docs/laravel-uptime-monitor/v1/monitoring-ssl-certificates/notifications)

Advanced usage
--------------

- [ Manually modifying monitors ](https://spatie.be/docs/laravel-uptime-monitor/v1/advanced-usage/manually-modifying-monitors)
- [ Customizing the uptime check ](https://spatie.be/docs/laravel-uptime-monitor/v1/advanced-usage/customizing-the-uptime-check)
- [ Customizing notifications ](https://spatie.be/docs/laravel-uptime-monitor/v1/advanced-usage/customizing-notifications)
- [ Disabling monitors ](https://spatie.be/docs/laravel-uptime-monitor/v1/advanced-usage/disabling-monitors)
- [ Using your own model ](https://spatie.be/docs/laravel-uptime-monitor/v1/advanced-usage/using-your-own-model)
- [ Monitoring from multiple locations ](https://spatie.be/docs/laravel-uptime-monitor/v1/advanced-usage/monitoring-from-multiple-locations)

      You are viewing the documentation for **an older version** of this package. You can check the version you are using with the following command:

 `                                    composer show spatie/laravel-uptime-monitor                                                                                                                                                                                                                                    `

Customizing the uptime check
============================

This package ships with a default configured uptime check. You can modify the behaviour of the uptime check by changing the values under the `uptime_check` key in the config file.

These are the default values:

```
     'uptime_check' => [

         /*
          * When the uptime check could reach the url of a monitor it will pass the response to this class
          * If this class determines the response is valid, the uptime check will be regarded as succeeded.
          *
          * You can use any implementation of Spatie\UptimeMonitor\Helpers\UptimeResponseCheckers\UptimeResponseChecker here.
          */
         'response_checker' => Spatie\UptimeMonitor\Helpers\UptimeResponseCheckers\LookForStringChecker::class,

         /*
          * An uptime check will be performed if the last check was performed more than the
          * given number of minutes ago. If you change this setting you have to manually
          * update the `uptime_check_interval_in_minutes` value of your existing monitors.
          *
          * When an uptime check fails we'll check the uptime for that montitor every time `monitor:check-uptime`
          * runs regardless of this setting.
          */
         'run_interval_in_minutes' => 5,

         /*
          * To speed up the uptime checking process the package can perform the uptime check of several
          * monitors concurrently. Set this to a lower value if you're getting weird errors
          * running the uptime check.
          */
         'concurrent_checks' => 10,

         /*
          * The uptime check for a monitor will fail if url does not respond after the
          * given number of seconds.
          */
         'timeout_per_site' => 10,

         /*
          * Fire `Spatie\UptimeMonitor\Events\MonitorFailed` event only after
          * the given number of uptime checks have consecutively failed for a monitor.
          */
         'fire_monitor_failed_event_after_consecutive_failures' => 2,

         /*
          * When reaching out to sites this user agent will be used.
          */
         'user_agent' => 'spatie/laravel-uptime-monitor uptime checker',

        /*
         * When reaching out to the sites these headers will be added.
         */
        'additional_headers' => [],
     ],
```
