Error using AgentJSON for Netapp

CMK version: 2.4.0p8
OS version: CheckMK Appliance 1.7.10

Error message: [special_json] KeyError: 'checks’CRIT , [special_netapp_ontap] Success, [piggyback] Success (but no data found for this host), execution time 4.0 sec

Hello everyone,

We would like to have a graphical history of latency.total, IOPS, and warn/crit thresholds in CheckMK to detect Netapp overloads.
For monitoring latency and IOPS, there is a URL that retrieves a JSON and returns it to CheckMK.

curl -X GET “https://API-URL/metrics?interval=1h&return_timeout=15&fields=latency.total,iops.total,throughput.total&max_records=1&return_records=true” -H “accept: application/json” -H “Authorization: Basic <Base64 encoded ‘User:Password’>”

The plugin was set up using Checkmk Exchange and is working so far.

However, it appears that the plugin does not use the CA certificates stored in CheckMK, which is why the check fails due to the incorrect or untrusted certificate.

According to my own research, this is probably because the JSON agent is not able to accept SSL certificates without verification.

I have already tried storing the corresponding certificate under /usr/local/share/ca-certificates, performing an update-ca-certificates, and restarting the site.

The result was:

By the way, there was no entry about this in the weblog.

I haven’t gotten much further here yet. Do you have any ideas about what else I can do?

Hi.

Looks like that checkmk instance ownor has no permission to write in system cert store. Looks like is hardcoded in the special agent.

Best regards,
Christian

Is there any other possibility to monitor a this metrics via CheckMK?

This file needs to be world readable - but it is not.

Well, giving the certificates 644-rights worked for the activating of the changes.

Unfortunately it did not resolve my initial problem:

I had a look at the Github repo and the agent_json is not a generic JSON special agent.
This agent excepts a specific data structure from the JSON endpoint.
Like it is shown in the readme

The Output of my API-Call seems to look right.

API-CALL

https://storage.newtron.lan/api/cluster/metrics?interval=1h&return_timeout=15&fields=latency.total,iops.total,throughput.total&max_records=1&return_records=true

OUTPUT

{
  "records": [
    {
      "timestamp": "2025-10-07T08:30:15Z",
      "latency": {
        "total": 422
      },
      "iops": {
        "total": 6900
      },
      "throughput": {
        "total": 33370654
      },
      "_links": {
        "self": {
          "href": "/api/cluster/metrics/2025-10-07T08%3A30%3A15Z"
        }
      }
    }
  ],
  "num_records": 1,
  "_links": {
    "self": {
      "href": "/api/cluster/metrics?interval=1h&return_timeout=15&fields=latency.total,iops.total,throughput.total&max_records=1&return_records=true"
    },
    "next": {
      "href": "/api/cluster/metrics?start.seq_no=0&start.timestamp=2025-10-07T08%3A30%3A15Z&interval=1h&return_timeout=15&fields=latency.total,iops.total,throughput.total&max_records=1&return_records=true"
    }
  }
}

This shouldn’t be an issue for this Plugin.

It is - in the posted link from my last post you see that the special agent expects the answer in the following format.

Result format needed:
{'checks', [{’name': 'My Check', ’status': 'UP', 'data': {'info1': „info', ’infox': 'more info'}]}

as i said it is not a generic json special agent.