Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically create per-client subscriptions #1327

Closed
calebhailey opened this issue Jun 10, 2016 · 9 comments

Comments

Projects
None yet
4 participants
@calebhailey
Copy link
Member

commented Jun 10, 2016

The Sensu client should automatically create a subscription called client:client-name (e.g. client:i-424242) for every client. This will allow for other features in Sensu to target specific clients or groups of clients using subscriptions.

@calebhailey calebhailey added the Feature label Jun 10, 2016

@calebhailey calebhailey added this to the 0.26 milestone Jun 10, 2016

@calebhailey

This comment has been minimized.

Copy link
Member Author

commented Jun 13, 2016

We'll need to coordinate w/ @palourde on this to make sure these subscriptions don't show up in the list of subscriptions for filtering views; h/t: #1316 (comment)

@troyready

This comment has been minimized.

Copy link

commented Jul 29, 2016

For transport methods that don't allow the client to connect to queue (e.g. the excellent sensu-transport-snssqs), would be nice to be able to optionally disable this or allow some other way of not connecting to the transport for each subscription.

cwjohnston added a commit to sensu/sensu-settings that referenced this issue Aug 3, 2016

add per-client subscriptions
This change set implements the per-client subscription feature as described in
sensu/sensu#1327:

> The Sensu client should automatically create a subscription called
>  `clint:client-name` (e.g. `client:i-424242`) for every client. This will allow
> for other features in Sensu to target specific clients or groups of clients
> using subscriptions.

This feature is intended to support per-client silencing via the new silence API
described in sensu/sensu#1328
@cwjohnston

This comment has been minimized.

Copy link
Member

commented Aug 3, 2016

Opened sensu/sensu-settings#40 to implement this feature.

@troyready I am not familiar with the SQS transport internals beyond my reading of the source code in Sensu client and the SQS transport, but my interpretation of these two methods leads me to believe that this change will have no impact on SQS users.

Feel free to test this for yourself by adding a subscription to one or more of your clients, e.g. assuming client name i-424242

{ "client": { "subscriptions": ["client:i-424242"] } }
@cwjohnston

This comment has been minimized.

Copy link
Member

commented Aug 3, 2016

@troyready actually as I dig deeper it seems to me that this subscribe() method defined in SQS transport is intended to be accessed only by the server process. SQS transport should probably add logic making subscribe() a no-op for clients.

@troyready

This comment has been minimized.

Copy link

commented Aug 3, 2016

@cwjohnston what we're trying to do is avoid the @transport.subscribe calls on sensu-clients. We can do that currently (at least as of 0.23, I haven't tested the newer releases but I think it's the same) by not defining any subscriptions on the clients.

Open to whatever the best way to handle it is.

@portertech

This comment has been minimized.

Copy link
Member

commented Aug 3, 2016

@troyready I believe that the SQS transport only needs to no-op subscribe() calls when the pipe type is fanout.

@troyready

This comment has been minimized.

Copy link

commented Aug 3, 2016

@portertech got it. Thanks (same to @cwjohnston ) for troubleshooting and pointing me in the right direction!

@portertech

This comment has been minimized.

Copy link
Member

commented Aug 9, 2016

@cwjohnston

This comment has been minimized.

Copy link
Member

commented Aug 11, 2016

Closed by #1411

@cwjohnston cwjohnston closed this Aug 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.