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
andmonitor:disable
change the value of theenabled
field -
monitor:list
lists all rows -
monitor:sync-file
syncs 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 ofuptime_check_interval_in_minutes
in the config file. -
uptime_check_method
: thehttp
method used by the uptime check. Iflook_for_string
is specified when creating the monitor this will be set toget
, otherwise this will behead
. -
uptime_check_payload
: a payload that will be sent as the monitor request body. If you are using this field, you should set theContent-Type
header in theuptime_check_additional_headers
field. -
uptime_check_additional_headers
: additional headers that are sent in the request. The value shoule be escapedJSON
. It will be decoded usingjson_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 ofSpatie\UptimeMonitor\Helpers\UptimeResponseCheckers\UptimeResponseChecker
and 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.