The names of the write-out variables are hard to remember. %{json} prints all of them in one go, so I’d look at the whole list first and pick what you need.
Send the body away and pipe the JSON into jq:
curl -s -o /dev/null -w '%{json}' https://example.com/ | jq .
You get keys like http_code, http_version, remote_ip, time_connect, time_total, num_redirects, exitcode and errormsg, plus many more. To keep just a few fields:
curl -s -o /dev/null -w '%{json}' https://example.com/ \
| jq '{code: .http_code, ip: .remote_ip, total: .time_total}'
That makes it easy to log checks as JSON lines and read them later with jq. A sibling, %{header_json}, does the same for the response headers.
Things to keep in mind: the set of keys depends on your curl version, so a field from a newer release may simply be missing on an older box. Values like timings are numbers in seconds, not strings with a unit. And the output follows the body, so if you forget -o /dev/null the page and the JSON end up mixed on standard output and jq fails. The variable needs curl 7.70 or newer.
Further reading: curl man page, everything curl: write out