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:createadds a row
monitor:deletedeletes a row
monitor:disablechange the value of the
monitor:listlists all rows
monitor:sync-filesyncs monitors from a json file (see 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_minutesin the config file.
httpmethod used by the uptime check. If
look_for_stringis specified when creating the monitor this will be set to
get, otherwise this will be
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-Typeheader in the
uptime_check_additional_headers: additional headers that are sent in the request. The value shoule be escaped
JSON. It will be decoded using
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\UptimeResponseCheckerand will be resolved using the service container.
All other fields in the
monitors table are managed by the package and should not be manually modified.