Skip to content

Examples

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

Examples / Cookbook

Copy-paste starting points. Each shows a sample response and the fields to configure. Adjust names, paths and thresholds to taste.

Spring Boot Actuator health

GET /actuator/health:

{"status": "UP", "components": {"db": {"status": "UP", "details": {"connections": 7}}}}
Service name JSON path Check
Health status expected UP
Database components.db.status expected UP
DB connections components.db.details.connections upper levels 50 / 100

→ services JSON Health, JSON Database, JSON DB connections.

A simple app /health

{"healthy": true, "version": "1.4.2", "uptime_seconds": 84231}
Service name JSON path Check
Healthy healthy expected true
Uptime uptime_seconds unit seconds

Remember: booleans match as JSON text — true/false, not True/False.

Array auto-discovery (one service per node)

{"nodes": [{"name": "web-1", "status": "UP"}, {"name": "web-2", "status": "DOWN"}]}
Service name JSON path Item label path Check
Node nodes[*].status name expected UP

JSON Node web-1 (OK) and JSON Node web-2 (CRIT).

Nested wildcards (pod / container)

{"pods": [{"name": "api", "containers": [{"name": "app", "ready": true}]}]}
Service name JSON path Item label path Check
Container ready pods[*].containers[*].ready name expected true

JSON Container ready api / app.

POST with a JSON body

Some APIs need a query in the body (e.g. a GraphQL or search endpoint).

  • HTTP method: POST
  • Request body: {"query": "{ health { status } }"}
  • Field: path data.health.status, expected OK

Authenticated endpoint (bearer token)

  1. Setup → Passwords → create an entry with your token.
  2. In the endpoint, set Authentication → Bearer token and pick the password-store entry.

The token is passed to the agent as a store reference, never in clear text. HTTP basic works the same way with a username + stored password.

One rule, several APIs

Add multiple endpoints to a single rule — e.g. a frontend /health and a backend /actuator/health. Each endpoint keeps its own connection settings and fields; all their services appear under the same host. If the backend is unreachable, only its services go UNKNOWN while the frontend's stay green. Keep service names unique across endpoints.

Sharing one rule across many hosts

Use Checkmk macros in the URL so a single rule follows the host it's applied to:

https://$HOSTADDRESS$/health
https://$HOSTNAME$.example.com/actuator/health

Macros are resolved per monitored host, so one rule scales across a folder.


Stuck on a value? See JSON paths and Troubleshooting.

Clone this wiki locally