Skip to content

JSON paths

Benjamin Knapp edited this page Jul 8, 2026 · 1 revision

JSON paths

The JSON path picks one value (or, with a wildcard, many) out of the response. It's a dotted syntax — not full JSONPath, just the parts you need.

Basics

Path Selects
status top-level key status
components.db.status nested key
items[0].count first element of the items array, then its count
$.status leading $. is optional and ignored

Keys that contain . or [

Bracket-quote them:

data['foo.bar'].value
metrics["cpu[0]"].load

Array discovery with [*]

A [*] wildcard turns one array into one service per element:

nodes[*].status

For a payload with a nodes array, this discovers JSON <name> <label> for each node. Use Item label path to choose the field that labels each service (e.g. name); without it, the array index is used.

If a label value repeats across elements, every occurrence is suffixed with its index, so two elements never collapse into one service.

Multiple wildcards

Multiple [*] expand the cartesian product:

pods[*].containers[*].ready

produces one service per (pod, container) pair, with a composite <pod> / <container> label.

Composite names can grow long; Checkmk truncates very long service descriptions.

Tips

  • Not sure of the exact path? Paste a sample response into the Explorer and click the field — it writes the path for you.
  • A path that doesn't resolve makes the service UNKNOWN ("path not found") — see Troubleshooting.
  • The Details view of a service echoes back the path it used, which is the fastest way to confirm you targeted the right value.

Next: Examples.

Clone this wiki locally