Closed portertech closed 5 years ago
PRs up for handler and mutator. Found some weirdness with filter
that might just be me not knowing sensu 2 details.
Found the filter weirdness and fixed it. PRs for remaining 3 custom resources are all updated. I can rebase as needed.
Once those are reviewed and merged I'll run another pass through testing to make sure there's solid test coverage for all generated specs.
Then we can discuss next steps and design improvements or refactoring.
sensu_check
is still missing proper check_hooks
handling, but that should be easy to fix now
Just need confirmation on the object schema for creating a check with check_hooks. Tried this without success:
{
"type": "check",
"spec": {
"check_hooks": {
"1": [
"nginx_restart"
]
},
"command": "/bin/true",
....
Found https://github.com/sensu/sensu-docs/issues/401 while working on this issue
@portertech I think this hook resource is still needed?
I think this work has been completed for a little while now.
Sensu 2.0 object configuration (e.g. check) is done via the Backend API. This cookbook must provide a number of LWRPs for object configuration, one for each Sensu object type. These LWRP must create a Sensu 2.0 object file on disk in a folder named after the object type, e.g.
/etc/sensu/checks
. Each LWRP must support every documented object configuration attribute for their type, e.g. https://docs.sensu.io/sensu-core/2.0/reference/checks/#check-attributes. When the object file is first written to disk or modified, the LWRPs must executesensuctl create -f $OBJECT_FILE
in order to create/update the Sensu 2.0 object via the Backend API.Object File Examples
/etc/sensu/checks/cron.json
/etc/sensu/handlers/default.json
LWRP Checklist
(Priority ordered)