[x] Update Changelog following the conventions laid out on Keep A Changelog
[x] Update README with any necessary configuration snippets
[x] RuboCop passes
Purpose
We check a number of aggregates by running a check-aggregate ruby script on our Sensu server against the Sensu API. All these checks use a roundrobin 'control' subscription that the Sensu server is subscribed to; and these checks make use of the proxy client feature to provide a meaningful client name for the check rather than displaying the Sensu server address.
There is a need to be able to alert specifically to different people for different aggregates (and thus different clients). The current scope of this script does not cover our use case (Alerting off the subscription is too broad & with a proxy client it does not have any subscriptions itself).
The proposed change will allow an extra hash in the json config which will be used to build mailing lists off the client name returned in the check data.
This will not cause any existing compatibility issues, the new block of code will only be executed should a user update their mailer json to include the new key.
Note: This code works but could probably be more elegant so feel free to suggest any improvements.
General
Purpose
We check a number of aggregates by running a check-aggregate ruby script on our Sensu server against the Sensu API. All these checks use a roundrobin 'control' subscription that the Sensu server is subscribed to; and these checks make use of the proxy client feature to provide a meaningful client name for the check rather than displaying the Sensu server address.
There is a need to be able to alert specifically to different people for different aggregates (and thus different clients). The current scope of this script does not cover our use case (Alerting off the subscription is too broad & with a proxy client it does not have any subscriptions itself). The proposed change will allow an extra hash in the json config which will be used to build mailing lists off the client name returned in the check data.
Sample config
Known Compatablity Issues
This will not cause any existing compatibility issues, the new block of code will only be executed should a user update their mailer json to include the new key.
Note: This code works but could probably be more elegant so feel free to suggest any improvements.
Cheers.