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

Add support for deregister client config and deregistration handler #550

Closed
jaxxstorm opened this issue Sep 15, 2016 · 3 comments
Closed
Assignees

Comments

@jaxxstorm
Copy link
Contributor

In sensu 0.25, the option to deregister a client was added: sensu/sensu#1315

This should be added for the next version of the module

@jaxxstorm jaxxstorm modified the milestone: 2.2.0 Sep 15, 2016
@jaxxstorm
Copy link
Contributor Author

I don't think this is urgent for 2.2.0, we have support for this in the init script/sysconfig so it's working currently.

Still a nice to have though

@ghoneycutt
Copy link
Collaborator

Can you please provide a reference implementation with the path of the json file and its contents?

@cwjohnston
Copy link
Contributor

@jeffmccune jeffmccune self-assigned this Jul 13, 2017
jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 14, 2017
Without this patch the sensu client does not support the deregister and
deregistration attributes.  These attributes are documented at [deregistration
attributes](https://sensuapp.org/docs/latest/reference/clients#deregistration-attributes)

This patch adds the `sensu::client_deregister` and
`sensu::client_deregistration` class parameters which flow through to the
sensu_client_config type and provider.

This patch also refactors the sensu_client_config type and provider to operate
the same way as the sensu_check type and provider.  Specifically, the JSON
provider dynamically introspects the set of properties from the type and
creates getter and setter methods to output the JSON.  Custom attributes are
enhanced, if `client_custom = absent` then all custom attributes in the client
configuration are removed.  Otherwise, the custom attributes are merged on top
of any existing custom attributes.

Resolves sensu#550
jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 14, 2017
Without this patch the sensu client does not support the deregister and
deregistration attributes.  These attributes are documented at [deregistration
attributes](https://sensuapp.org/docs/latest/reference/clients#deregistration-attributes)

This patch adds the `sensu::client_deregister` and
`sensu::client_deregistration` class parameters which flow through to the
sensu_client_config type and provider.

This patch also refactors the sensu_client_config type and provider to operate
the same way as the sensu_check type and provider.  Specifically, the JSON
provider dynamically introspects the set of properties from the type and
creates getter and setter methods to output the JSON.  Custom attributes are
enhanced, if `client_custom = absent` then all custom attributes in the client
configuration are removed.  Otherwise, the custom attributes are merged on top
of any existing custom attributes.

Resolves sensu#550
jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 14, 2017
Without this patch the sensu client does not support the deregister and
deregistration attributes.  These attributes are documented at [deregistration
attributes](https://sensuapp.org/docs/latest/reference/clients#deregistration-attributes)

This patch adds the `sensu::client_deregister` and
`sensu::client_deregistration` class parameters which flow through to the
sensu_client_config type and provider.

This patch also refactors the sensu_client_config type and provider to operate
the same way as the sensu_check type and provider.  Specifically, the JSON
provider dynamically introspects the set of properties from the type and
creates getter and setter methods to output the JSON.  Custom attributes are
enhanced, if `client_custom = absent` then all custom attributes in the client
configuration are removed.  Otherwise, the custom attributes are merged on top
of any existing custom attributes.

Resolves sensu#550
jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 14, 2017
Without this patch the sensu client does not support the deregister and
deregistration attributes.  These attributes are documented at [deregistration
attributes](https://sensuapp.org/docs/latest/reference/clients#deregistration-attributes)

This patch adds the `sensu::client_deregister` and
`sensu::client_deregistration` class parameters which flow through to the
sensu_client_config type and provider.

This patch also refactors the sensu_client_config type and provider to operate
the same way as the sensu_check type and provider.  Specifically, the JSON
provider dynamically introspects the set of properties from the type and
creates getter and setter methods to output the JSON.  Custom attributes are
enhanced, if `client_custom = absent` then all custom attributes in the client
configuration are removed.  Otherwise, the custom attributes are merged on top
of any existing custom attributes.

Resolves sensu#550
jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 15, 2017
Without this patch the sensu client does not support the deregister and
deregistration attributes.  These attributes are documented at [deregistration
attributes](https://sensuapp.org/docs/latest/reference/clients#deregistration-attributes)

This patch adds the `sensu::client_deregister` and
`sensu::client_deregistration` class parameters which flow through to the
sensu_client_config type and provider.

This patch also refactors the sensu_client_config type and provider to operate
the same way as the sensu_check type and provider.  Specifically, the JSON
provider dynamically introspects the set of properties from the type and
creates getter and setter methods to output the JSON.  Custom attributes are
enhanced, if `client_custom = absent` then all custom attributes in the client
configuration are removed.  Otherwise, the custom attributes are merged on top
of any existing custom attributes.

When the client config is flushed to /etc/sensu/conf.d/client.json the top
level set of keys are sorted.  This isn't terribly useful as there is usually
just one key, `{"client":{}}`.  The value of the client attribute is also
sorted, making the output more useful and human readable.

Resolves sensu#550
johanek pushed a commit to sohonet/sensu-puppet that referenced this issue Jul 18, 2017
Without this patch the sensu client does not support the deregister and
deregistration attributes.  These attributes are documented at [deregistration
attributes](https://sensuapp.org/docs/latest/reference/clients#deregistration-attributes)

This patch adds the `sensu::client_deregister` and
`sensu::client_deregistration` class parameters which flow through to the
sensu_client_config type and provider.

This patch also refactors the sensu_client_config type and provider to operate
the same way as the sensu_check type and provider.  Specifically, the JSON
provider dynamically introspects the set of properties from the type and
creates getter and setter methods to output the JSON.  Custom attributes are
enhanced, if `client_custom = absent` then all custom attributes in the client
configuration are removed.  Otherwise, the custom attributes are merged on top
of any existing custom attributes.

When the client config is flushed to /etc/sensu/conf.d/client.json the top
level set of keys are sorted.  This isn't terribly useful as there is usually
just one key, `{"client":{}}`.  The value of the client attribute is also
sorted, making the output more useful and human readable.

Resolves sensu#550
johanek added a commit to sohonet/sensu-puppet that referenced this issue Jul 18, 2017
(sensu#550) Add sensu client de-registration
jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 19, 2017
Without this patch the sensu client does not support the deregister and
deregistration attributes.  These attributes are documented at [deregistration
attributes](https://sensuapp.org/docs/latest/reference/clients#deregistration-attributes)

This patch adds the `sensu::client_deregister` and
`sensu::client_deregistration` class parameters which flow through to the
sensu_client_config type and provider.

This patch also refactors the sensu_client_config type and provider to operate
the same way as the sensu_check type and provider.  Specifically, the JSON
provider dynamically introspects the set of properties from the type and
creates getter and setter methods to output the JSON.  Custom attributes are
enhanced, if `client_custom = absent` then all custom attributes in the client
configuration are removed.  Otherwise, the custom attributes are merged on top
of any existing custom attributes.

When the client config is flushed to /etc/sensu/conf.d/client.json the top
level set of keys are sorted.  This isn't terribly useful as there is usually
just one key, `{"client":{}}`.  The value of the client attribute is also
sorted, making the output more useful and human readable.

Resolves sensu#550
jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 19, 2017
Without this patch the sensu client does not support the deregister and
deregistration attributes.  These attributes are documented at [deregistration
attributes](https://sensuapp.org/docs/latest/reference/clients#deregistration-attributes)

This patch adds the `sensu::client_deregister` and
`sensu::client_deregistration` class parameters which flow through to the
sensu_client_config type and provider.

This patch also refactors the sensu_client_config type and provider to operate
the same way as the sensu_check type and provider.  Specifically, the JSON
provider dynamically introspects the set of properties from the type and
creates getter and setter methods to output the JSON.  Custom attributes are
enhanced, if `client_custom = absent` then all custom attributes in the client
configuration are removed.  Otherwise, the custom attributes are merged on top
of any existing custom attributes.

When the client config is flushed to /etc/sensu/conf.d/client.json the top
level set of keys are sorted.  This isn't terribly useful as there is usually
just one key, `{"client":{}}`.  The value of the client attribute is also
sorted, making the output more useful and human readable.

Resolves sensu#550
jeffmccune added a commit to jeffmccune/sensu-puppet that referenced this issue Jul 19, 2017
Without this patch the sensu client does not support the deregister and
deregistration attributes.  These attributes are documented at [deregistration
attributes](https://sensuapp.org/docs/latest/reference/clients#deregistration-attributes)

This patch adds the `sensu::client_deregister` and
`sensu::client_deregistration` class parameters which flow through to the
sensu_client_config type and provider.

This patch also refactors the sensu_client_config type and provider to operate
the same way as the sensu_check type and provider.  Specifically, the JSON
provider dynamically introspects the set of properties from the type and
creates getter and setter methods to output the JSON.  Custom attributes are
enhanced, if `client_custom = absent` then all custom attributes in the client
configuration are removed.  Otherwise, the custom attributes are merged on top
of any existing custom attributes.

When the client config is flushed to /etc/sensu/conf.d/client.json the top
level set of keys are sorted.  This isn't terribly useful as there is usually
just one key, `{"client":{}}`.  The value of the client attribute is also
sorted, making the output more useful and human readable.

Resolves sensu#550
ghoneycutt added a commit that referenced this issue Jul 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants