How to monitor Nextcloud with Uptime Kuma

Ref. Howto: Use serverinfo with curl

Thanks to @Stefan.H for the wiki entry.

I am using Uptime Kuma, an open-source monitoring tool, and I am struggling to understand how to tweak the JSON query. Can somebody please point me in the right direction?

I can call the endpoint OK from the command line:
curl -H 'NC-Token: <mytoken> ' -X GET https://<mynextcloud>/ocs/v2.php/apps/serverinfo/api/v1/info?format=json

{"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":{"nextcloud":{...

My Uptime Kuma config looks like this:

What do I need to change the JSON query and expected value to?

Hi,
the resulting JSON object for your query looks like this:

{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 200,
      "message": "OK"
    },
    ...
  }
}

Your json query in Uptime Kuma has to follow jsonata syntax. So in your case you have to query for “ocs.meta.status”. Futhermore you have to check for the value “ok” (as you already do).

You can check your jsonata query on JSONata Exerciser.