GET /status/v1/services
Retrieves statuses for all Puppet Enterprise (PE) services on a specific port.
Request format
When Forming status API requests to this endpoint, you must specify the port associated with the PE services you want to query. The default ports and their associated services are as follows:
Port | Service(s) |
---|---|
4433 |
|
8140 |
|
8143 |
|
8081 | PuppetDB |
This endpoint's content type is application/json; charset=utf-8
, and
you can append these parameters to the URL:
level
: How thorough of a check to run. Set tocritical
,debug
, orinfo
. The default isinfo
.timeout
: Specified in seconds. The default is30
.
For example, this request uses certificate authentication and fetches info
status information for PE
services running on port 4433:
cert="$(puppet config print hostcert)" cacert="$(puppet config print localcacert)" key="$(puppet config print hostprivkey)" curl --cert "$cert" --cacert "$cacert" --key "$key" \ --header "Content-Type: application/json; charset=utf-8" \ --request GET "https://puppet.status.example:4433/status/v1/services?level=info&timeout=60"
Response format
The server uses these response codes:
200
if, and only if, all services report a status of running.503
if any service’s status isunknown
orerror
.400
if an invalid level parameter is set (notcritical
,debug
, orinfo
).
A successful response contains a JSON object listing details about the services. Responses use these keys:
Key | Definition |
---|---|
service_version
|
Package version of the JAR file containing a given service. |
service_status_version
|
The version of the API used to report the status of the service. |
detail_level
|
The level of detail shown. One of
critical , debug , or
info . |
state
|
The current state of the service. One of
running , error , or
unknown . |
status
|
An object with the service’s status details. Usually
only relevant for error and unknown states. |
active_alerts
|
An array of objects containing
severity and a message about your
replication from pglogical if you have replication enabled; otherwise,
it's an empty array. |
For example, a request about services on port 4433 (which includes the Activity service, the Classifier, and RBAC) returns a response similar to the following:
{ "activity-service": { "service_version": "2019.8.0.0", "service_status_version": 1, "detail_level": "info", "state": "running", "status": { "db_up": true, "db_pool": { "state": "ready" }, "replication": { "mode": "none", "status": "none" } }, "active_alerts": [] }, "classifier-service": { "service_version": "2019.8.0.0", "service_status_version": 1, "detail_level": "info", "state": "running", "status": { "db_up": true, "db_pool": { "state": "ready" }, "rbac_up": true, "activity_up": true, "replication": { "mode": "none", "status": "none" } }, "active_alerts": [] }, "rbac-service": { "service_version": "2019.8.0.0", "service_status_version": 1, "detail_level": "info", "state": "running", "status": { "db_up": true, "db_pool": { "state": "ready" }, "activity_up": true, "replication": { "mode": "none", "status": "none" } }, "active_alerts": [] }, "status-service": { "service_version": "1.1.0", "service_status_version": 1, "detail_level": "info", "state": "running", "status": {}, "active_alerts": [] } }