Closed majormoses closed 6 years ago
ping @eheydrick
lolwoops missed this. LGTM. Does exit 3 in a handler do anything special?
Release away.
@eheydrick an unknown
is essentially printing a message and exiting with 3: https://github.com/sensu-plugins/sensu-plugin/blob/v2.1.0/lib/sensu-plugin.rb#L8 and https://github.com/sensu-plugins/sensu-plugin/blob/v2.1.0/lib/sensu-plugin/cli.rb#L23-L32 I just did not feel like doing another include for some reason.
Right, I was uncertain if sensu-handler
does the same exit code printing stuff as sensu-plugin
does in regular checks. I think you'll see the message in the server log.
ya I would just need to include the sensu cli into the handler and it seemed easier to just have the same end result. I wonder if we should auto include cli into handler class., do you know if there was any reason we don't?
i think it's fine as is. handlers don't really run on the cli and you never see the log output except if you're looking for it in the server log.
Pull Request Checklist
58
General
[ ] Update Changelog following the conventions laid out on Keep A Changelog
[ ] Update README with any necessary configuration snippets
[ ] Binstubs are created if needed
[ ] RuboCop passes
[ ] Existing tests pass
Purpose
Provide user with better feedback when improperly using
contact
rather thancontacts
when passing multiple contacts.Known Compatibility Issues
Anyone who is using it currently incorrectly will have start alerting them to their misconfiguration. I feel the benefit outweighs the negative as it informs them exactly what needs to change and if they pull in a major version without reading the changelog that is on them.