Monitoring Chef Automate
Use the authenticated https endpoint /status to monitor your Chef Automate installation.
Checking the Status Endpoint
The authenticated endpoint /status provides status for the Chef Automate installation as well as for its component services. When all Chef Automate component services are up, /status returns a response code of 200. Otherwise, /status returns 500.
The status of a service can be OK, UNKNOWN, or CRITICAL, and is shown in the JSON output:
{ "ok": false, "service_status": [ { "service": "deployment-service", "status": "OK" }, { "service": "config-mgmt-service", "status": "UNKNOWN" }, { "service": "ingest-service", "status": "CRITICAL" }, ] } To use /status, set up an authentication token for use with your monitoring system by following the steps below:
Generate a token:
chef-automate iam token create --id <token-id> <token-name>Create a policy that allows your created token to access the
/statusendpoint.curl -k -H "api-token: <admin-token>" -d '{ "name": "Monitoring", "id": "monitoring", "members": [ "token:<token-id>" ], "statements": [ { "effect": "ALLOW", "actions": [ "system:status:get" ], "projects": [ "*" ] } ] }' -X POST https://automate.example.com/apis/iam/v2/policies?prettyTest that your token and policy give you access to the
/statusendpoint by running the following command:curl -k -H "api-token: <token-id>" https://automate.example.com/api/v0/status?prettyThe output appears in the following JSON format:
{ "ok": true, "services": [ { "name": "deployment-service", "status": "OK" }, { "name": "backup-gateway", "status": "OK" }, { "name": "automate-postgresql", "status": "OK" }, ] }After establishing your authentication token and confirming access, connect to the
/statusendpoint.