Closed majormoses closed 7 years ago
@majormoses you could have a setting that uses the legacy (custom) client subscription convention.
True, but they also could use trigger_on
which would accomplish the same thing right? This simply changes the default to match versions 0.26+ and are still backwards compatible with a configuration change.
They can add a custom client subscription in the new "client:client_name" format or keep running the previous version. Or better yet, upgrade.
Actually to be backwards compatible you could have both old and new format in the subscribers
array. The client will only run one instance of a check at a time so this should be safe in the case where someone upgrades and still has the legacy subscription.
@eheydrick updated per your suggestion and have updated the changelog to reflect.
In sensu version 0.26 clients create and subscribes to a unique client subscription named after it. It should look like "client:#{client_name}", this changes the fallback from "#{client_name}" to "client:#{client_name}" when the check does not have an attribute of
trigger_on
.Credit: https://github.com/Ssawa/sensu-plugins-sensu/commit/764ca7b5164689c1f0cc1d534d5bb7008125f5c1
Signed-off-by: Ben Abrams me@benabrams.it
Pull Request Checklist
closes #31
General
[x] Update Changelog following the conventions laid out on Our CHANGELOG Guidelines
[ ] Update README with any necessary configuration snippets
[x] Binstubs are created if needed
[x] RuboCop passes
[x] Existing tests pass
Purpose
Leverage new built in auto created client (that it auto subscribes to).
Known Compatibility Issues
This is a breaking change, for all clients that are < 0.26 you must set
trigger_on
as the default has changed from the client name to an internal client name that it auto subscribes to.