Puppet orchestrator API: usage endpoint
Use the /usage
endpoint to view details about the active nodes in your
deployment.
GET /usage
List the daily node usage of the orchestrator and nodes that are present in PuppetDB.
Parameters
Parameter | Definition |
---|---|
start_date |
Expected to be in the format YYYY-MM-DD, the first day to include in the result |
end_date |
Expected to be in the format YYYY-MM-DD, the last day to
include in the result must be >=
start_date
|
Response format
The response is a JSON object indicating the total number of active nodes and subtotals of the nodes with and without an agent installed.
The following keys are used:
Key | Definition |
---|---|
items |
Contains an array entries from most recent to least recent. |
date |
An ISO 8601 date representing the date of the request in UTC. |
total_nodes |
The total number of nodes used since UTC midnight. |
nodes_with_agent |
The number of nodes in pdb at the time the request is made. |
nodes_without_agent |
The number of unique nodes that don't have an agent that were used since UTC midnight. |
corrective_agent_changes |
The number of corrective changes made by agent runs. |
intentional_agent_changes |
The number of intentional changes made by agent runs. |
nodes_affected_by_task_runs |
The number of tasks run (counted per node that a task runs on). |
nodes_affected_by_plan_runs |
The number of plans run (counted per node that a plan runs on). |
pagination |
An optional object that includes information about the original query. |
start_date |
The starting day for the request (if specified). |
end_date |
The last day requested (if specified). |
{
"items":[
{
"date": "2018-06-08",
"total_nodes": 100,
"nodes_with_agent": 95,
"nodes_without_agent": 5
}, {
"date": "2018-06-07",
"total_nodes": 100,
"nodes_with_agent": 95,
"nodes_without_agent": 5
}, {
"date": "2018-06-06",
"total_nodes": 100,
"nodes_with_agent": 95,
"nodes_without_agent": 5
}, {
"date": "2018-06-05",
"total_nodes": 100,
"nodes_with_agent": 95,
"nodes_without_agent": 5
}
],
"pagination":{
"start_date": "2018-06-01",
"end_date": "2018-06-30"
}
}
Error Responses
For this endpoint, the kind
key of the error displays the conflict.
Related information