-
Notifications
You must be signed in to change notification settings - Fork 0
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.
| 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 |
Bracket-quote them:
data['foo.bar'].value
metrics["cpu[0]"].load
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 [*] 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.
- 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.