Manually modifying monitors | 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/v3)  Advanced-usage  Manually modifying monitors

 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/v3/introduction)
- [ Postcardware ](https://spatie.be/docs/laravel-uptime-monitor/v3/postcardware)
- [ Requirements ](https://spatie.be/docs/laravel-uptime-monitor/v3/requirements)
- [ Upgrading from a previous version ](https://spatie.be/docs/laravel-uptime-monitor/v3/upgrading-from-v2)
- [ High level overview ](https://spatie.be/docs/laravel-uptime-monitor/v3/high-level-overview)
- [ Installation and setup ](https://spatie.be/docs/laravel-uptime-monitor/v3/installation-and-setup)
- [ Questions &amp; issues ](https://spatie.be/docs/laravel-uptime-monitor/v3/questions-and-issues)
- [ Changelog ](https://spatie.be/docs/laravel-uptime-monitor/v3/changelog)
- [ About us ](https://spatie.be/docs/laravel-uptime-monitor/v3/about-us)

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

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

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

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

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

- [ Manually modifying monitors ](https://spatie.be/docs/laravel-uptime-monitor/v3/advanced-usage/manually-modifying-monitors)
- [ Syncing monitors from a file ](https://spatie.be/docs/laravel-uptime-monitor/v3/advanced-usage/syncing-monitors-from-a-file)
- [ Customizing the uptime check ](https://spatie.be/docs/laravel-uptime-monitor/v3/advanced-usage/customizing-the-uptime-check)
- [ Customizing notifications ](https://spatie.be/docs/laravel-uptime-monitor/v3/advanced-usage/customizing-notifications)
- [ Disabling monitors ](https://spatie.be/docs/laravel-uptime-monitor/v3/advanced-usage/disabling-monitors)
- [ Using your own model ](https://spatie.be/docs/laravel-uptime-monitor/v3/advanced-usage/using-your-own-model)
- [ Monitoring from multiple locations ](https://spatie.be/docs/laravel-uptime-monitor/v3/advanced-usage/monitoring-from-multiple-locations)
- [ Sending and verifying a payload ](https://spatie.be/docs/laravel-uptime-monitor/v3/advanced-usage/sending-and-verifying-a-payload)

 Manually modifying monitors
===========================

All configured monitors are stored in the `monitors` table in the database. The various `monitor` commands manipulate the data that table:

- `monitor:create` adds a row
- `monitor:delete` deletes a row
- `monitor:enable` and `monitor:disable` change the value of the `enabled` field
- `monitor:list` lists all rows
- `monitor:sync-file` syncs monitors from a json file (see [syncing monitors from a file](https://docs.spatie.be/laravel-uptime-monitor/v3/advanced-usage/syncing-monitors-from-a-file))

You can also manually manipulate the table rows instead. Here's a description of the fields you can manipulate:

- `url`: the url to perform uptime and ssl certificate checks on. Take care not to insert duplicate values.
- `uptime_check_enabled`: determines if the uptime check should be performed for this monitor.
- `certificate_check_enabled`: determines if the ssl certificate check should be performed for this monitor.
- `look_for_string`: if this string is not found in the response the uptime check will fail. You may set this to an empty string to disable the check.
- `uptime_check_interval_in_minutes`: if the uptime check was successful that site won't be checked again for at least this number of minutes. When a monitor is created this field is filled with the value of `uptime_check_interval_in_minutes` in the config file.
- `uptime_check_method`: the `http` method used by the uptime check. If `look_for_string` is specified when creating the monitor this will be set to `get`, otherwise this will be `head`.
- `uptime_check_payload`: a payload that will be sent as the monitor request body. If you are using this field, you should set the `Content-Type` header in the `uptime_check_additional_headers` field.
- `uptime_check_additional_headers`: additional headers that are sent in the request. The value shoule be escaped `JSON`. It will be decoded using `json_decode`. Example: `{"Content-Type":"application\/json"}`
- `uptime_check_response_checker`: the fully qualified class name of a custom response checker that will be used only for this monitor. It must be an implementation of `Spatie\UptimeMonitor\Helpers\UptimeResponseCheckers\UptimeResponseChecker` and will be resolved using the [service container](https://laravel.com/docs/5.5/container).

All other fields in the `monitors` table are managed by the package and should not be manually modified.
