Skip to content

Instantly share code, notes, and snippets.

@nicklewis
Created May 19, 2011 02:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicklewis/980080 to your computer and use it in GitHub Desktop.
Save nicklewis/980080 to your computer and use it in GitHub Desktop.
Puppet Report json_shape schema
{
"report":
[ "object",
{ "members":
{
"host": "string",
"time": "string",
"logs": ["array", {"contents": "log_entry"}],
"metrics": ["dictionary", {"contents": "metric"}],
"resource_statuses": ["dictionary", {"keys": "^[A-Z]\\w*\\[.+\\]$", "contents": "resource_status"}],
"configuration_version": ["either", {"choices": ["integer", "string"]}],
"report_format": ["literal", 2],
"puppet_version": ["string", {"matches": "^\\d+\\.\\d+\\.\\d+$"}],
"kind": ["enum", {"values": ["apply", "inspect"]}],
"status": ["enum", {"values": ["failed", "changed", "unchanged"]}]
}
}
],
"log_entry":
[ "object",
{ "members":
{
"file": "string",
"line": "integer",
"level": ["enum", {"values": ["debug", "info", "notice", "warning", "err", "alert", "emerg", "crit"]}],
"message": "string",
"source": "string",
"tags": ["array", {"contents": "string"}],
"time": "string"
}
}
],
"metric":
[ "object",
{ "members":
{
"name": "string",
"label": "string",
"values": [ "array",
{ "contents":
[ "tuple", { "elements": ["string", "string", "number"]} ]
}
]
}
}
],
"resource_status":
[ "object",
{ "members":
{
"resource_type": "string",
"title": "string",
"resource": ["string", {"matches": "^[A-Z]\\w*\\[.+\\]$"}],
"file": "string",
"line": "integer",
"evaluation_time": ["number", {"min": 0}],
"change_count": ["integer", {"min": 0}],
"out_of_sync_count": ["integer", {"min": 0}],
"tags": ["array", {"contents": "string"}],
"time": "string",
"events": ["array", {"contents": "event"}],
"out_of_sync": "boolean",
"changed": "boolean",
"skipped": "boolean",
"failed": "boolean"
}
}
],
"event":
[ "object",
{ "members":
{
"audited": "boolean",
"property": "string",
"previous_value": ["either", {"choices": ["string", "array", "dictionary", "number"]}],
"desired_value": ["either", {"choices": ["string", "array", "dictionary", "number"]}],
"historical_value": ["either", {"choices": ["string", "array", "dictionary", "number"]}],
"message": "string",
"name": "string",
"status": ["enum", {"values": ["success", "failure", "noop", "audit"]}],
"time": "string"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment